From 19dc5b64cb47da71382b9c0ec0f94be2a8063916 Mon Sep 17 00:00:00 2001 From: ThibaultBee <37510686+ThibaultBee@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:06:10 +0200 Subject: [PATCH] feat(*): upgrade AGP to 8.5 and dependencies.0 --- example/build.gradle.kts | 30 +++++++++++------------ gradle/libs.versions.toml | 31 +++++++++++++++++++++--- gradle/wrapper/gradle-wrapper.properties | 2 +- srtdroid-core/build.gradle.kts | 16 ++++++------ srtdroid-ktx/build.gradle.kts | 10 ++++---- 5 files changed, 57 insertions(+), 32 deletions(-) diff --git a/example/build.gradle.kts b/example/build.gradle.kts index 2ef1a450..1c4cfb85 100644 --- a/example/build.gradle.kts +++ b/example/build.gradle.kts @@ -8,7 +8,7 @@ android { compileSdk = AndroidVersions.COMPILE_SDK defaultConfig { - minSdk = AndroidVersions.MIN_SDK + minSdk = 21 versionCode = 1 versionName = "$version" @@ -41,19 +41,19 @@ android { dependencies { implementation(project(":srtdroid-ktx")) - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.22") - implementation("androidx.appcompat:appcompat:1.6.1") - implementation("androidx.core:core-ktx:1.12.0") - implementation("androidx.constraintlayout:constraintlayout:2.1.4") - implementation("androidx.multidex:multidex:2.0.1") - implementation("androidx.preference:preference-ktx:1.2.1") - implementation("androidx.navigation:navigation-fragment-ktx:2.7.7") - implementation("androidx.navigation:navigation-ui-ktx:2.7.7") - implementation("com.google.guava:guava:32.1.2-jre") - - testImplementation("junit:junit:4.13.2") - - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + implementation(libs.kotlin.stdlib.jdk7) + implementation(libs.appcompat) + implementation(libs.core.ktx) + implementation(libs.constraintlayout) + implementation(libs.multidex) + implementation(libs.preference.ktx) + implementation(libs.navigation.fragment.ktx) + implementation(libs.navigation.ui.ktx) + implementation(libs.guava) + + testImplementation(libs.junit) + + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1dbea8ef..b9bedd72 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,38 @@ [versions] -agp = "8.3.2" -dokkaBase = "1.9.20" +agp = "8.5.0" +androidxJunit = "1.2.1" +appcompat = "1.7.0" +constraintlayout = "2.1.4" +coreKtx = "1.13.1" +dokka = "1.9.20" +espressoCore = "3.6.1" +guava = "32.1.3-jre" +junit = "4.13.2" kotlin = "1.9.22" +multidex = "2.0.1" +navigationFragmentKtx = "2.7.7" +preferenceKtx = "1.2.1" +runner = "1.6.1" [libraries] +appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } +core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } +espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" } +ext-junit = { module = "androidx.test.ext:junit", version.ref = "androidxJunit" } +guava = { module = "com.google.guava:guava", version.ref = "guava" } +junit = { module = "junit:junit", version.ref = "junit" } +kotlin-stdlib-jdk7 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk7", version.ref = "kotlin" } +multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" } +navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigationFragmentKtx" } +navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigationFragmentKtx" } +preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } +rules = { module = "androidx.test:rules", version.ref = "runner" } +runner = { module = "androidx.test:runner", version.ref = "runner" } [plugins] androidApplication = { id = "com.android.application", version.ref = "agp" } jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } androidLibrary = { id = "com.android.library", version.ref = "agp" } -dokka = { id = "org.jetbrains.dokka", version.ref = "dokkaBase" } +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e411586a..48c0a02c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/srtdroid-core/build.gradle.kts b/srtdroid-core/build.gradle.kts index f46e7642..2b8210c3 100644 --- a/srtdroid-core/build.gradle.kts +++ b/srtdroid-core/build.gradle.kts @@ -47,14 +47,14 @@ android { } dependencies { - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.22") - implementation("androidx.core:core-ktx:1.12.0") + implementation(libs.kotlin.stdlib.jdk7) + implementation(libs.core.ktx) - testImplementation("junit:junit:4.13.2") + testImplementation(libs.junit) - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test:runner:1.5.2") - androidTestImplementation("androidx.test:rules:1.5.0") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") - androidTestImplementation("com.google.guava:guava:32.1.2-jre") + androidTestImplementation(libs.junit) + androidTestImplementation(libs.runner) + androidTestImplementation(libs.rules) + androidTestImplementation(libs.espresso.core) + androidTestImplementation(libs.guava) } \ No newline at end of file diff --git a/srtdroid-ktx/build.gradle.kts b/srtdroid-ktx/build.gradle.kts index 61235da6..dd6b0ec8 100644 --- a/srtdroid-ktx/build.gradle.kts +++ b/srtdroid-ktx/build.gradle.kts @@ -43,11 +43,11 @@ android { dependencies { api(project(":srtdroid-core")) - implementation("androidx.core:core-ktx:1.12.0") - implementation("androidx.appcompat:appcompat:1.6.1") + implementation(libs.core.ktx) + implementation(libs.appcompat) - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) }