From d3c1a73050cad74460a7fedddb114d196e5703aa Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 15 Nov 2020 14:04:14 +0530 Subject: build: refactor for configuration cache compatibility (#1208) Signed-off-by: Harsh Shandilya --- app/build.gradle.kts | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'app') diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 87e436a0..a668a080 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -3,7 +3,6 @@ * SPDX-License-Identifier: GPL-3.0-only */ import com.android.build.gradle.internal.api.BaseVariantOutputImpl -import java.util.Properties plugins { id("com.android.application") @@ -11,12 +10,6 @@ plugins { `aps-plugin` } -val keystorePropertiesFile = rootProject.file("keystore.properties") - -fun isSnapshot(): Boolean { - return System.getenv("GITHUB_WORKFLOW") != null && System.getenv("SNAPSHOT") != null -} - android { if (isSnapshot()) { applicationVariants.all { @@ -26,13 +19,6 @@ android { } } - adbOptions.installOptions("--user 0") - - buildFeatures { - viewBinding = true - buildConfig = true - } - defaultConfig { applicationId = "dev.msfjarvis.aps" versionCode = 2_00_00 @@ -46,36 +32,6 @@ android { disable("MissingTranslation", "PluralsCandidate", "ImpliedQuantity") } - buildTypes { - named("release") { - isMinifyEnabled = true - setProguardFiles(listOf("proguard-android-optimize.txt", "proguard-rules.pro")) - buildConfigField("boolean", "ENABLE_DEBUG_FEATURES", if (isSnapshot()) "true" else "false") - } - named("debug") { - applicationIdSuffix = ".debug" - versionNameSuffix = "-debug" - isMinifyEnabled = false - buildConfigField("boolean", "ENABLE_DEBUG_FEATURES", "true") - } - } - - if (keystorePropertiesFile.exists()) { - val keystoreProperties = Properties() - keystoreProperties.load(keystorePropertiesFile.inputStream()) - signingConfigs { - register("release") { - keyAlias = keystoreProperties["keyAlias"] as String - keyPassword = keystoreProperties["keyPassword"] as String - storeFile = rootProject.file(keystoreProperties["storeFile"] as String) - storePassword = keystoreProperties["storePassword"] as String - } - } - listOf("release", "debug").map { - buildTypes.getByName(it).signingConfig = signingConfigs.getByName(it) - } - } - flavorDimensions("free") productFlavors { create("free") { -- cgit v1.2.3