Update gradle
This commit is contained in:
parent
5b180cd1ae
commit
eaf19c09b9
1 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
// 0. Download OsmAndCore_wrapper for build
|
||||||
// +1. AndroidManifest.xml (+versionCode/APK_NUMBER_VERSION, +package, +android:process, +icon)
|
// +1. AndroidManifest.xml (+versionCode/APK_NUMBER_VERSION, +package, +android:process, +icon)
|
||||||
|
|
||||||
// 2. no_translate.xml (versionFeatures, app.edition, build.version )
|
// 2. no_translate.xml (versionFeatures, app.edition, build.version )
|
||||||
|
@ -222,10 +223,18 @@ collectExternalResources.dependsOn collectVoiceAssets,
|
||||||
collectRegionsInfo,
|
collectRegionsInfo,
|
||||||
collectHelpContents,
|
collectHelpContents,
|
||||||
collectMiscResources
|
collectMiscResources
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
compileTask -> compileTask.dependsOn << collectExternalResources
|
compileTask -> compileTask.dependsOn << collectExternalResources
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task downloadAAR {
|
||||||
|
def f = new File("libs/OsmAndCore_wrapper.jar")
|
||||||
|
if (!f.exists()) {
|
||||||
|
new URL("http://builder.osmand.net:81/binaries/android/OsmAndCore_wrapper.jar").withInputStream{ i -> f.withOutputStream{ it << i }}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Legacy core build
|
// Legacy core build
|
||||||
import org.apache.tools.ant.taskdefs.condition.Os
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
task buildOsmAndCore(type: Exec) {
|
task buildOsmAndCore(type: Exec) {
|
||||||
|
@ -246,7 +255,7 @@ task cleanupDuplicatesInCore(type: Delete) {
|
||||||
delete "libs/x86/libgnustl_shared.so"
|
delete "libs/x86/libgnustl_shared.so"
|
||||||
}
|
}
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
compileTask -> compileTask.dependsOn << [buildOsmAndCore, cleanupDuplicatesInCore]
|
compileTask -> compileTask.dependsOn << [buildOsmAndCore, downloadAAR, cleanupDuplicatesInCore]
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -259,6 +268,7 @@ repositories {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: "libs", include: ["*.jar"], exclude: ["QtAndroid-bundled.jar", "QtAndroidAccessibility-bundled.jar", "android-support*.jar", "OsmAndCore_wrapper.jar"])
|
compile fileTree(dir: "libs", include: ["*.jar"], exclude: ["QtAndroid-bundled.jar", "QtAndroidAccessibility-bundled.jar", "android-support*.jar", "OsmAndCore_wrapper.jar"])
|
||||||
compile 'com.android.support:appcompat-v7:21.0.3'
|
compile 'com.android.support:appcompat-v7:21.0.3'
|
||||||
|
|
Loading…
Reference in a new issue