-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
Ideally following the style of the android closure allowing to override less specific configs, for example:
android {
...
defaultConfig {
applicationId 'com.jenzz.buildconstants.sample'
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName '1.0.0'
}
flavorDimensions 'abi', 'version'
productFlavors {
free {
dimension 'version'
}
pro {
dimension 'version'
}
arm {
dimension "abi"
}
mips {
dimension "abi"
}
x86 {
dimension "abi"
}
}
}
buildConstants {
defaultConfig {
fileNames {
java 'SampleBuildConstants'
xml 'sample_build_constants'
}
constants {
aString = 'string'
}
}
// overrides defaultConfig
freeDebug {
fileNames {
java 'SampleBuildConstants2'
xml 'sample_build_constants_2'
}
constants {
aString = 'string_two'
}
}
// overrides freeDebug
armFreeDebug {
fileNames {
java 'BuildConstantsFlavor3'
xml 'build_constants_flavor3'
}
constants {
aString = 'string_three'
}
}
}
CeccoCQ