diff options
Diffstat (limited to 'platform/android/build.gradle.template')
-rw-r--r-- | platform/android/build.gradle.template | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template index b0630d9a3a..24951b921b 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' } } @@ -18,7 +18,7 @@ allprojects { dependencies { compile 'com.android.support:support-v4:23.+' // can be removed if minSdkVersion 16 and modify DownloadNotification.java & V14CustomNotification.java - $$GRADLE_DEPENDENCIES$$ + $$GRADLE_DEPENDENCIES$$ } android { @@ -39,34 +39,49 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 23 + $$GRADLE_DEFAULT_CONFIG$$ + } + // 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' java.srcDirs = ['src' - $$GRADLE_JAVA_DIRS$$ + $$GRADLE_JAVA_DIRS$$ ] resources.srcDirs = [ 'res' - $$GRADLE_RES_DIRS$$ + $$GRADLE_RES_DIRS$$ ] res.srcDirs = ['res'] // libs.srcDirs = ['libs'] aidl.srcDirs = [ 'aidl' - $$GRADLE_AIDL_DIRS$$ + $$GRADLE_AIDL_DIRS$$ ] assets.srcDirs = [ 'assets' - $$GRADLE_ASSET_DIRS$$ + $$GRADLE_ASSET_DIRS$$ ] jniLibs.srcDirs = [ 'libs' - $$GRADLE_JNI_DIRS$$ - ] + $$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")) } - - } |