diff --git a/Core2/Matomo/build.gradle.kts b/Core2/Matomo/build.gradle.kts index 7784304a9..a218eb76c 100644 --- a/Core2/Matomo/build.gradle.kts +++ b/Core2/Matomo/build.gradle.kts @@ -3,12 +3,16 @@ plugins { alias(libs.plugins.kotlin.android) } +val sharedCompileSdk: Int by rootProject.extra +val sharedMinSdk: Int by rootProject.extra +val sharedJavaVersion: JavaVersion by rootProject.extra + android { namespace = "com.infomaniak.matomo" - compileSdk = 34 + compileSdk = sharedCompileSdk defaultConfig { - minSdk = 24 + minSdk = sharedMinSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") @@ -24,8 +28,8 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = sharedJavaVersion + targetCompatibility = sharedJavaVersion } buildFeatures { @@ -33,7 +37,7 @@ android { } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = sharedJavaVersion.toString() } } diff --git a/Core2/Network/build.gradle.kts b/Core2/Network/build.gradle.kts index 5338bfe7b..bfe913cec 100644 --- a/Core2/Network/build.gradle.kts +++ b/Core2/Network/build.gradle.kts @@ -3,12 +3,16 @@ plugins { alias(libs.plugins.kotlin.android) } +val sharedCompileSdk: Int by rootProject.extra +val sharedMinSdk: Int by rootProject.extra +val sharedJavaVersion: JavaVersion by rootProject.extra + android { namespace = "com.infomaniak.network" - compileSdk = 34 + compileSdk = sharedCompileSdk defaultConfig { - minSdk = 24 + minSdk = sharedMinSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") @@ -21,11 +25,11 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = sharedJavaVersion + targetCompatibility = sharedJavaVersion } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = sharedJavaVersion.toString() } } diff --git a/Core2/Sentry/build.gradle.kts b/Core2/Sentry/build.gradle.kts index 229de5fb8..98a3e37a0 100644 --- a/Core2/Sentry/build.gradle.kts +++ b/Core2/Sentry/build.gradle.kts @@ -3,12 +3,16 @@ plugins { alias(libs.plugins.kotlin.android) } +val sharedCompileSdk: Int by rootProject.extra +val sharedMinSdk: Int by rootProject.extra +val sharedJavaVersion: JavaVersion by rootProject.extra + android { namespace = "com.infomaniak.sentry" - compileSdk = 34 + compileSdk = sharedCompileSdk defaultConfig { - minSdk = 24 + minSdk = sharedMinSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") @@ -21,11 +25,11 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = sharedJavaVersion + targetCompatibility = sharedJavaVersion } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = sharedJavaVersion.toString() } } diff --git a/Core2/build.gradle.kts b/Core2/build.gradle.kts index 0387011ee..f342244b9 100644 --- a/Core2/build.gradle.kts +++ b/Core2/build.gradle.kts @@ -3,12 +3,16 @@ plugins { alias(libs.plugins.kotlin.android) } +val sharedCompileSdk: Int by rootProject.extra +val sharedMinSdk: Int by rootProject.extra +val sharedJavaVersion: JavaVersion by rootProject.extra + android { namespace = "com.infomaniak.core2" - compileSdk = 34 + compileSdk = sharedCompileSdk defaultConfig { - minSdk = 24 + minSdk = sharedMinSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") @@ -21,11 +25,11 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = sharedJavaVersion + targetCompatibility = sharedJavaVersion } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = sharedJavaVersion.toString() } } diff --git a/FileTypes/build.gradle.kts b/FileTypes/build.gradle.kts index b4aeaf7ac..9e4c4ca7c 100644 --- a/FileTypes/build.gradle.kts +++ b/FileTypes/build.gradle.kts @@ -4,12 +4,16 @@ plugins { alias(libs.plugins.compose.compiler) } +val sharedCompileSdk: Int by rootProject.extra +val sharedMinSdk: Int by rootProject.extra +val sharedJavaVersion: JavaVersion by rootProject.extra + android { namespace = "com.infomaniak.library.filetypes" - compileSdk = 34 + compileSdk = sharedCompileSdk defaultConfig { - minSdk = 24 + minSdk = sharedMinSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") @@ -22,11 +26,11 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = sharedJavaVersion + targetCompatibility = sharedJavaVersion } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = sharedJavaVersion.toString() } buildFeatures { compose = true diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 112f8c80e..f663a9326 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,18 +9,18 @@ plugins { kotlin("plugin.serialization") version libs.versions.kotlin } +val sharedCompileSdk: Int by rootProject.extra val sharedMinSdk: Int by rootProject.extra -val sharedTargetSdk: Int by rootProject.extra -val javaVersion: JavaVersion by rootProject.extra +val sharedJavaVersion: JavaVersion by rootProject.extra android { namespace = "com.infomaniak.swisstransfer" - compileSdk = sharedTargetSdk + compileSdk = sharedCompileSdk defaultConfig { applicationId = "com.infomaniak.swisstransfer" minSdk = sharedMinSdk - targetSdk = sharedTargetSdk + targetSdk = sharedCompileSdk versionCode = 1 // 0_00_000_01 TODO: Update when released in prod versionName = "0.0.1-Alpha1" @@ -45,11 +45,11 @@ android { } compileOptions { - sourceCompatibility = javaVersion - targetCompatibility = javaVersion + sourceCompatibility = sharedJavaVersion + targetCompatibility = sharedJavaVersion } kotlinOptions { - jvmTarget = javaVersion.toString() + jvmTarget = sharedJavaVersion.toString() } buildFeatures { compose = true diff --git a/build.gradle.kts b/build.gradle.kts index dcad8f2e1..8f0f9f22c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,8 @@ buildscript { extra.apply { - set("sharedTargetSdk", 35) + set("sharedCompileSdk", 35) set("sharedMinSdk", 24) - set("javaVersion", JavaVersion.VERSION_17) + set("sharedJavaVersion", JavaVersion.VERSION_17) } }