Merge branch 'osmand293-fix' into 'master'

Fix OsmAnd 2.9.3 Build

See merge request fdroid/fdroiddata!2919
This commit is contained in:
Marcus 2018-02-21 14:18:21 +00:00
commit 240671e9b6

View file

@ -348,17 +348,6 @@ Build:2.9.3,293
gradle=full,legacy,fat
rm=android/eclipse-compile,android/OsmAnd-java/libs/*.jar,android/OsmAnd-java/test/libs/*.jar,android/OsmAnd/ant-lib/*.jar,android/OsmAnd/libs/*.jar,android/OsmAndCore-sample
prebuild=sed -i -e "/net.osmand:OsmAndCore_android:.*SNAPSHOT@jar/d" ../OsmAnd/build.gradle && \
pushd ../../OsmAnd-core/wrappers/android/ && \
sed -i -e "/Native/d" settings.gradle && \
sed -i -e "/Native/d" build.gradle && \
sed -i -e "/compileTask.*copyNdkSharedLibs/d" build.gradle && \
sed -i -e "/compileTask.*copyQtSharedLibs/d" build.gradle && \
sed -i -e "/compileTask.*copyQtJarLibs/d" build.gradle && \
gradle assembleRelease && \
cd build/outputs/aar && \
unzip OsmAndCore_android-release.aar && \
cp classes.jar ../../../../../../android/OsmAnd/libs/ && \
popd && \
sed -i -e '/qt.*Compile/d' -e '/com.google.firebase/d' build.gradle ../plugins/Osmand-ParkingPlugin/build.gradle ../plugins/Osmand-SRTMPlugin/build.gradle ../plugins/Osmand-Skimaps/build.gradle ../plugins/Osmand-Nautical/build.gradle && \
sed -i -e "s/System.getenv(\"APK_VERSION\")/\"$$VERSION$$\"/g" build.gradle && \
sed -i -e "s/System.getenv(\"APK_NUMBER_VERSION\")/\"$$VERCODE$$\"/g" build.gradle && \
@ -371,7 +360,18 @@ Build:2.9.3,293
sed -i -e "s/compile fileTree.*/ compile fileTree(include: ['classes.jar'], dir: 'libs')\n compile 'commons-logging:commons-logging-api:1.1'\n compile 'it.unibo.alice.tuprolog:tuprolog:3.2.1'\n compile 'org.beanshell:bsh-core:2.0b4'\n compile 'com.ibm.icu:icu4j:50.1'\n compile 'fr.univ-valenciennes:bzip2:1.0'\n compile 'com.moparisthebest:junidecode:0.1.1'\n compile group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'\n compile 'org.immutables:gson:2.5.0'\n compile 'com.vividsolutions:jts-core:1.14.0'/" build.gradle && \
sed -i -e "s/public void debug(Object message) {/ public void trace(Object message) { }\n public void trace(Object message, Throwable t) { }\n public boolean isTraceEnabled() { return false; }\n public void debug(Object message) {/" src/net/osmand/PlatformUtil.java && \
sed -i -e "s/, ':OsmAndCore-sample'//" ../settings.gradle
scanignore=help/website/help/map-legend_nautical.png,help/website/help/map-legend_default.png,android/OsmAnd/libs/classes.jar
scanignore=help/website/help/map-legend_nautical.png,help/website/help/map-legend_default.png,help/website/images/dvr/4p-en.png,help/website/images/blog/ios-2-0/con-scrn-1.png,help/website/images/blog/ios-2-0/con-scrn-2.png,help/website/images/blog/ios-2-0/interf-2.png,help/website/images/blog/ios-2-0/navigat-6.png
build=pushd ../../OsmAnd-core/wrappers/android/ && \
sed -i -e "/Native/d" settings.gradle && \
sed -i -e "/Native/d" build.gradle && \
sed -i -e "/compileTask.*copyNdkSharedLibs/d" build.gradle && \
sed -i -e "/compileTask.*copyQtSharedLibs/d" build.gradle && \
sed -i -e "/compileTask.*copyQtJarLibs/d" build.gradle && \
gradle assembleRelease && \
cd build/outputs/aar && \
unzip OsmAndCore_android-release.aar && \
cp classes.jar ../../../../../../android/OsmAnd/libs/ && \
popd
ndk=r11c
Maintainer Notes:
@ -380,7 +380,7 @@ Update CV only after sucessfully built and tested.
Summary and Description have been moved to the new localizable text files:
https://f-droid.org/docs/All_About_Descriptions_Graphics_and_Screenshots
scanignore: Initial section of prebuild commands builds the OsmAnd core java
Initial section of build commands builds the OsmAnd core java
interface. The standard build downloads a prebuilt jar file from the OsmAnd
build server. To avoid this, the required jar file is built in
OsmAnd-core/wrappers/android, with some sed commands to prevent building of the
@ -389,10 +389,11 @@ core is used, built in the core-legacy module. OsmAnd-core in full has not yet
been released). This includes preventing the various Qt files being built,
also with sed commands. Once this is built, the jar file is extracted from
build/outputs/aar/OsmAndCore_android-release.aar and it is copied to the
android/OsmAnd submodule as libs/classes.jar. Hence, scanignore must not
complain about this file. A couple of rogue pngs are also ignored.
android/OsmAnd submodule as libs/classes.jar.
The very first sed command prevents gradle downloading
A couple of rogue pngs are scan-ignored.
In the prebuild, the very first sed command prevents gradle downloading
OsmAndCore_android.*SNAPSHOT.jar, which contains the files built above.
Many other jar files are distributed, prebuilt, with the OsmAnd submodules.