From 7c41a22690dc6ba65c3c4e9abc1c638b90471f39 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 7 Jan 2019 10:45:17 +0000 Subject: [PATCH] Use product flavors --- .gitignore | 2 +- app/build.gradle | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 4f5bd399a1..a954316777 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ /build /captures .externalNativeBuild -/app/release +/app/full /app/play /tools/config.sh crowdin.properties diff --git a/app/build.gradle b/app/build.gradle index deed61490e..62014b753b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ android { minSdkVersion 21 targetSdkVersion 28 versionCode 261 - versionName "1.$versionCode" + versionName "1.261" archivesBaseName = "FairEmail-v$versionName" javaCompileOptions { @@ -24,19 +24,6 @@ android { useProguard = true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 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 { debuggable = true @@ -44,10 +31,24 @@ android { useProguard = false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' buildConfigField "boolean", "BETA_RELEASE", "true" + } + } + + flavorDimensions "all" + + productFlavors { + full { + dimension "all" 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 { + dimension "all" + buildConfigField "boolean", "PLAY_STORE_RELEASE", "true" + buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\"" + buildConfigField "String", "GITHUB_LATEST_API", "\"\"" + } } lintOptions {