diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2016-06-15 15:21:18 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2016-06-27 10:49:15 +0200 |
commit | e7b2626707457fe1d6af36da3d7a1ec3863cd52f (patch) | |
tree | e26d425d30bc9ce108ab260e8aff8fca181a3dba /platform/android/build.gradle.template | |
parent | 2c59f778850dc4450481680e859efd66660c9119 (diff) |
Make Android build smarter (SCons + Gradle)
Upgrade Gradle and Android plugin for Gradle
Disable all signing and zip-aligning for the export templates
Give correct names to generated APKs
Put .so files built by SCons right where Gradle has to pick them according to arch & build type
Downgrade NDK platform to 14 to match minSdkVersion
Diffstat (limited to 'platform/android/build.gradle.template')
-rw-r--r-- | platform/android/build.gradle.template | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template index 1e1461ef29..d7bc615e37 100644 --- a/platform/android/build.gradle.template +++ b/platform/android/build.gradle.template @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' + classpath 'com.android.tools.build:gradle:2.1.0' } } @@ -40,6 +40,11 @@ android { minSdkVersion 14 targetSdkVersion 23 } + // Both signing and zip-aligning will be done at export time + buildTypes.all { buildType -> + buildType.zipAlignEnabled false + buildType.signingConfig null + } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' @@ -65,8 +70,17 @@ android { $$GRADLE_JNI_DIRS$$ ] } - + debug.jniLibs.srcDirs = [ + 'libs/debug' + $$GRADLE_JNI_DIRS$$ + ] + release.jniLibs.srcDirs = [ + 'libs/release' + $$GRADLE_JNI_DIRS$$ + ] + } + applicationVariants.all { variant -> + // ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin + variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk")) } - - } |