diff --git a/metadata/net.osmand.plus.txt b/metadata/net.osmand.plus.txt index ad2a4b12f1..c9d0ecb7cf 100644 --- a/metadata/net.osmand.plus.txt +++ b/metadata/net.osmand.plus.txt @@ -374,6 +374,40 @@ Build:2.9.3,293 popd ndk=r11c +Build:3.0.0,300 + commit=e2054218ab4dec175cd84b1ae48798dd5aeb291e + subdir=android/OsmAnd + submodules=yes + sudo=apt-get update && \ + apt-get install --yes -t jessie-backports swig + gradle=full,legacy,fat + rm=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 && \ + 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 && \ + sed -i -e "s/System.getenv(\"APP_FEATURES\")/\"+play_market +gps_status -parking_plugin -blackberry -amazon -route_nav\"/g" build.gradle && \ + sed -i -e "s/System.getenv(\"APP_NAME\")/\"OsmAnd~\"/g" build.gradle && \ + sed -i -e "s/System.getenv(\"TARGET_APP_NAME\")/\"OsmAnd~\"/g" build.gradle && \ + sed -i -e '/com.android.vending.BILLING/d' AndroidManifest.xml && \ + sed -i -e '/javaMaxHeapSize/s/4g/1536m/g' build.gradle && \ + sed -i -e "s/compile fileTree.*/ compile 'commons-logging:commons-logging:1.1.1'\n compile group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'\n compile 'org.json:json:20090211'\n compile 'it.unibo.alice.tuprolog:tuprolog:3.2.1'\n compile 'net.sf.kxml:kxml2:2.3.0'\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 'com.vividsolutions:jts-core:1.14.0'/" ../OsmAnd-java/build.gradle && \ + sed -i -e "s/implementation fileTree.*/implementation fileTree(include: ['classes.jar'], dir: 'libs')\n implementation 'com.ibm.icu:icu4j:50.1'\n implementation group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'\n/" build.gradle && \ + sed -i -e "s/, ':OsmAndCore-sample'//" ../settings.gradle + 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,android/OsmAnd/assets/fonts/RobotoSlab-Regular.ttf + 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: Update CV only after sucessfully built and tested. @@ -410,12 +444,6 @@ Replacement of jar files in OsmAnd-java where versions did not match: junidecode-0.1.jar replaced with compile 'com.moparisthebest:junidecode:0.1.1' simple-logging.jar not replaced (subset of commons-logging-1.1.1.jar) -In OsmAnd directory, jar files are replaced as above except for those specifically excluded by the compile fileTree command, which are: - android-support-multidex.jar - QtAndroid-bundled.jar was not replaced - QtAndroidAccessibility-bundled.jar was not replaced - simple-logging.jar replaced by commons-logging-api:1.1 with sed addition of missing abstract methods trace(...) in PlatformUtils.java - The final sed command removes OsmAndCore-sample from the settings to prevent its build (which also downloads prebuilt binaries). OsmAndCore-sample is demo code that is not needed.