Fix build with Android NDK r18

As a bonus there is no need to use undocumented Gradle API any more.
This commit is contained in:
Wojciech Milkowski 2018-10-08 22:35:18 +02:00
parent 0063ba9207
commit 3598165c4d
2 changed files with 8 additions and 5 deletions

View File

@ -1,10 +1,11 @@
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
$$GRADLE_REPOSITORY_URLS$$ $$GRADLE_REPOSITORY_URLS$$
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.2.0'
$$GRADLE_CLASSPATH$$ $$GRADLE_CLASSPATH$$
} }
} }
@ -32,7 +33,7 @@ android {
} }
compileSdkVersion 27 compileSdkVersion 27
buildToolsVersion "27.0.3" buildToolsVersion "28.0.3"
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'
packagingOptions { packagingOptions {
@ -75,9 +76,11 @@ android {
$$GRADLE_JNI_DIRS$$ $$GRADLE_JNI_DIRS$$
] ]
} }
applicationVariants.all { variant -> applicationVariants.all { variant ->
// ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin variant.outputs.all { output ->
variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk")) output.outputFileName = "../../../../../../../bin/android_${variant.name}.apk"
}
} }
} }

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip