Use product flavors

pull/147/head
M66B 6 years ago
parent 1b3f8e5f3f
commit 7c41a22690

2
.gitignore vendored

@ -11,7 +11,7 @@
/build /build
/captures /captures
.externalNativeBuild .externalNativeBuild
/app/release /app/full
/app/play /app/play
/tools/config.sh /tools/config.sh
crowdin.properties crowdin.properties

@ -7,7 +7,7 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 261 versionCode 261
versionName "1.$versionCode" versionName "1.261"
archivesBaseName = "FairEmail-v$versionName" archivesBaseName = "FairEmail-v$versionName"
javaCompileOptions { javaCompileOptions {
@ -24,19 +24,6 @@ android {
useProguard = true useProguard = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "BETA_RELEASE", "true" buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\""
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\""
}
play {
debuggable = false
minifyEnabled = true
useProguard = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/pro/\""
buildConfigField "String", "GITHUB_LATEST_API", "\"\""
} }
debug { debug {
debuggable = true debuggable = true
@ -44,10 +31,24 @@ android {
useProguard = false useProguard = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "BETA_RELEASE", "true" buildConfigField "boolean", "BETA_RELEASE", "true"
}
}
flavorDimensions "all"
productFlavors {
full {
dimension "all"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false" buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/pro/\"" buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/pro/\""
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\"" buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\""
} }
play {
dimension "all"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\""
buildConfigField "String", "GITHUB_LATEST_API", "\"\""
}
} }
lintOptions { lintOptions {

Loading…
Cancel
Save