add ability to build a second variant. Works, but they can't both be

installed because of duplicate permissions.
This commit is contained in:
Eric House 2016-02-03 20:44:40 -08:00
parent 2cb989022c
commit 0684139183

View file

@ -4,6 +4,9 @@ def CHAT_ENABLED = true
def THUMBNAIL_ENABLED = true def THUMBNAIL_ENABLED = true
def LIBS_DEBUG = 'libs-debug' def LIBS_DEBUG = 'libs-debug'
def LIBS_RELEASE = 'libs-release' def LIBS_RELEASE = 'libs-release'
def VERSION_CODE_BASE = 1
def VARIANTS = [ "Xw4", "Xw4dbg" ]
def BUILDS = [ "Debug", "Release" ]
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
@ -15,7 +18,6 @@ android {
compileSdkVersion 22 compileSdkVersion 22
buildToolsVersion "22.0.1" buildToolsVersion "22.0.1"
defaultConfig { defaultConfig {
applicationId "org.eehouse.android.xw4"
minSdkVersion 7 minSdkVersion 7
targetSdkVersion 14 targetSdkVersion 14
} }
@ -23,29 +25,40 @@ android {
// Rename all output artifacts to include version information // Rename all output artifacts to include version information
// applicationVariants.all { variant -> // applicationVariants.all { variant ->
// renameArtifact(variant) // renameArtifact(variant)
// variant.buildConfigField "String", "FIELD_NAME", "\"my String\""
// } // }
// flavorDimensions "variant", "abi" flavorDimensions "variant"//, "abi"
// productFlavors { productFlavors {
// xw4 { xw4 {
// dimension "variant" dimension "variant"
// } applicationId "org.eehouse.android.xw4"
// xw4dbg { }
// dimension "variant" xw4dbg {
// } dimension "variant"
// armeabiv7a { applicationId "org.eehouse.android.xw4dbg"
// dimension "abi" }
// }
// armeabi { // WARNING: "all" breaks things. Seems to be a keyword. Need
// dimension "abi" // to figure out how to express include-all-abis
// } // all {
// dimension "abi"
// versionCode 0 + VERSION_CODE_BASE
// }
// armeabi {
// dimension "abi"
// versionCode 1 + VERSION_CODE_BASE
// }
// x86 {
// dimension "abi"
// versionCode 2 + VERSION_CODE_BASE
// }
// armeabiv7a {
// dimension "abi"
// versionCode 3 + VERSION_CODE_BASE
// }
// x86 { }
// dimension "abi"
// }
// }
signingConfigs { signingConfigs {
release { release {
@ -154,8 +167,12 @@ task mkXml(type: Exec) {
} }
afterEvaluate { afterEvaluate {
compileReleaseNdk.dependsOn ndkBuildRelease VARIANTS.each { VARIANT ->
compileDebugNdk.dependsOn ndkBuildDebug String compileTask = "compile${VARIANT}ReleaseNdk"
tasks.getByName(compileTask).dependsOn ndkBuildRelease
compileTask = "compile${VARIANT}DebugNdk"
tasks.getByName(compileTask).dependsOn ndkBuildDebug
}
} }
task askForPassword << { task askForPassword << {