roostaamir
roostaamir

Reputation: 1968

Is it possible to change the java code files of external libraries downloaded by gradle in android studio?

I am now working with OSMDroid and I want to modify two java files that was downloaded by gradle and then put into External libraries section. The two java files are : MapTileFileArchiveProv.java and ZipFileArchive.java. The are located in one of the packages in a classes.jar file. I am 90% sure that they are compiled and cannot be modified just by opening them in the editor, edit them and save them.

What are my options here?

Upvotes: 0

Views: 747

Answers (1)

jenglert
jenglert

Reputation: 1609

Since OSMDroid is on GitHub you can fork it, modify whatever files, and build it yourself. You could then have gradle reference it directly as a project or put the output jar(s) into your project's "libs" dir and then add the following as a dependency:

compile fileTree(dir: 'libs', include: ['*.jar'])

The downside of this is you'll have to maintain your fork by merging in future changesets periodically if you want to stay up to date with the master repo.

Upvotes: 1

Related Questions