mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 12:56:45 -06:00
[Gradle] Add build flavors.
This commit is contained in:
parent
db265fa12b
commit
06407ee439
@ -18,6 +18,8 @@ android {
|
|||||||
versionName release.versionName
|
versionName release.versionName
|
||||||
|
|
||||||
buildConfigField "java.util.Map<String, String>", "GIT_INFO", gitInfoMap
|
buildConfigField "java.util.Map<String, String>", "GIT_INFO", gitInfoMap
|
||||||
|
buildConfigField "long", "BUILD_TIMESTAMP", String.valueOf(System.currentTimeMillis())
|
||||||
|
buildConfigField "String", "VERSION_BASE", release.versionName
|
||||||
|
|
||||||
multiDexEnabled = true
|
multiDexEnabled = true
|
||||||
|
|
||||||
@ -27,6 +29,7 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
variant.outputs.all {
|
variant.outputs.all {
|
||||||
@ -47,6 +50,19 @@ android {
|
|||||||
proguardFiles fileTree('proguard').asList().toArray()
|
proguardFiles fileTree('proguard').asList().toArray()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
flavorDimensions "platform"
|
||||||
|
productFlavors {
|
||||||
|
main {
|
||||||
|
versionName gitInfo.versionHuman
|
||||||
|
}
|
||||||
|
official {}
|
||||||
|
play {}
|
||||||
|
}
|
||||||
|
variantFilter { variant ->
|
||||||
|
def flavors = variant.flavors*.name
|
||||||
|
setIgnore(variant.buildType.name == "debug" && !flavors.contains("main"))
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user