osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.59k stars 1.01k forks source link

Replace prebuilt jar files with Maven dependencies #4712

Open yourealwaysbe opened 6 years ago

yourealwaysbe commented 6 years ago

I have been working on adding the new version of OsmAnd to the F-Droid repository. A problem here is that F-Droid does not accept prebuilt binaries. Our discussion can be followed here.

One hopefully easy to fix issue is the number of libraries distributed with OsmAnd that could be replaced by Maven dependencies. The purpose of this post is to ask:

We have been able to remove all jar files and still compile OsmAnd with the following replacements. Our simple testing seems to show no problems. I will list the replacements in full before discussing mismatches.

In OsmAnd/build.gradle, the fileTree dependencies can be replaced with

compile 'commons-logging:commons-logging-api:1.1'
compile 'it.unibo.alice.tuprolog:tuprolog:3.2.1'
compile 'org.beanshell:bsh-core:2.0b4'
compile 'com.ibm.icu:icu4j:50.1'
compile 'fr.univ-valenciennes:bzip2:1.0'
compile 'com.moparisthebest:junidecode:0.1.1'
compile 'net.sf.trove4j:trove4j:3.0.3'
compile 'org.immutables:gson:2.5.0'
compile 'com.vividsolutions:jts-core:1.14.0'

In OsmAnd-java/build.gradle, the dependencies can be replaced with

compile 'commons-logging:commons-logging:1.1.1'
compile 'net.sf.trove4j:trove4j:3.0.3'
compile 'org.json:json:20090211'
compile 'it.unibo.alice.tuprolog:tuprolog:3.2.1'
compile 'net.sf.kxml:kxml2:2.3.0'
compile 'org.beanshell:bsh-core:2.0b4'
compile 'com.ibm.icu:icu4j:50.1'
compile 'fr.univ-valenciennes:bzip2:1.0'
compile 'com.moparisthebest:junidecode:0.1.1'
compile 'com.vividsolutions:jts-core:1.14.0'

There are the following mismatches:

I have seen a similar issue raised before. However, hopefully this request is simpler, and i'm volunteering to make the patch.

vshcherb commented 6 years ago

It sounds good to me though it is required in depth testing. I would not volunteer myself of doing it but I would recommend it to do to double check sanity of libraries & also make it developer friendly. So it is definitely worth to create pull request & test if it works correctly. I would be happy to comment if there are any issues.

P.S. all the jars are explained correctly to my view.