From 91d83cbc6bf2ca30d5a7786115a75d8be5115308 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Tue, 13 Jun 2023 15:42:00 -0400 Subject: [PATCH] Bug 1838312 - Remove hardcoded compileSdkVersion, minSdkVersion and targetSdkVersion in Fenix and Focus This removes the hardcoded compileSdkVersion, minSdkVersion and targetSdkVersion in Fenix and Focus in favor of reading these SDK versions via our config from AC. --- app/build.gradle | 6 +++--- benchmark/build.gradle | 4 ++-- buildSrc/src/main/java/Config.kt | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 81d60db1fc..989768403e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,7 +23,7 @@ import static org.gradle.api.tasks.testing.TestResult.ResultType apply from: 'benchmark.gradle' android { - compileSdkVersion Config.compileSdkVersion + compileSdkVersion config.compileSdkVersion project.maybeConfigForJetpackBenchmark(it) if (project.hasProperty("testBuildType")) { @@ -34,8 +34,8 @@ android { defaultConfig { applicationId "org.mozilla" - minSdkVersion Config.minSdkVersion - targetSdkVersion Config.targetSdkVersion + minSdkVersion config.minSdkVersion + targetSdkVersion config.targetSdkVersion versionCode 1 versionName Config.generateDebugVersionName() vectorDrawables.useSupportLibrary = true diff --git a/benchmark/build.gradle b/benchmark/build.gradle index 8feec5f2b8..6080f21f68 100644 --- a/benchmark/build.gradle +++ b/benchmark/build.gradle @@ -9,7 +9,7 @@ plugins { android { namespace 'org.mozilla.fenix.benchmark' - compileSdk Config.compileSdkVersion + compileSdk config.compileSdkVersion compileOptions { sourceCompatibility = JavaVersion.VERSION_17 @@ -22,7 +22,7 @@ android { defaultConfig { minSdk 23 - targetSdk Config.targetSdkVersion + targetSdk config.targetSdkVersion testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index 6f0e2ba50b..51dc5894a1 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -11,10 +11,6 @@ import java.util.Date import java.util.Locale object Config { - // Synchronized build configuration for all modules - const val compileSdkVersion = 33 - const val minSdkVersion = 21 - const val targetSdkVersion = 33 @JvmStatic private fun generateDebugVersionName(): String {