From aa69646b2db96f4dcad2c16e1a3bf28b5d2aab62 Mon Sep 17 00:00:00 2001 From: Ray <154766448+damontecres@users.noreply.github.com> Date: Fri, 13 Feb 2026 14:49:19 -0500 Subject: [PATCH] Upgrade AGP to 9.x (#892) ## Description This PR has no user facing changes. Upgrade AGP to 9.x and Gradle to 9.x. Also updates some dependencies as well. Note: still using deprecated `android.newDsl=false` because the protobuf plugin is not yet compatible: https://github.com/google/protobuf-gradle-plugin/issues/793. ### Related issues N/A ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None --- app/build.gradle.kts | 4 ++-- build.gradle.kts | 1 - gradle.properties | 10 ++++++++++ gradle/libs.versions.toml | 16 ++++++---------- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 29c36ac2..5ab4a9cc 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,7 +7,6 @@ import java.util.Properties plugins { alias(libs.plugins.android.application) - alias(libs.plugins.kotlin.android) alias(libs.plugins.ksp) alias(libs.plugins.kotlin.compose) alias(libs.plugins.hilt) @@ -70,6 +69,7 @@ android { } kotlin { compilerOptions { + languageVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3 jvmTarget = JvmTarget.JVM_11 javaParameters = true } @@ -150,7 +150,7 @@ android { sourceSets { getByName("main") { - kotlin.srcDirs("$buildDir/generated/seerr_api/src/main/kotlin") + kotlin.directories += "$buildDir/generated/seerr_api/src/main/kotlin" } } } diff --git a/build.gradle.kts b/build.gradle.kts index f2004532..7e765b97 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { alias(libs.plugins.android.application) apply false - alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.jvm) apply false alias(libs.plugins.protobuf) apply false alias(libs.plugins.ksp) apply false diff --git a/gradle.properties b/gradle.properties index 132244e5..23480cc7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,3 +21,13 @@ kotlin.code.style=official # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true +android.defaults.buildfeatures.resvalues=false +android.sdk.defaultTargetSdkToCompileSdkIfUnset=true +android.enableAppCompileTimeRClass=true +android.usesSdkInManifest.disallowed=true +android.uniquePackageNames=true +android.dependency.useConstraints=false +android.r8.strictFullModeForKeepRules=true +android.r8.optimizedResourceShrinking=true +android.builtInKotlin=true +android.newDsl=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 92c7835c..69f0d876 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,20 +1,18 @@ [versions] aboutLibraries = "13.2.1" acra = "5.13.1" -agp = "8.13.2" +agp = "9.0.1" auto-service = "1.1.1" autoServiceKsp = "1.2.0" desugar_jdk_libs = "2.1.5" -hiltCompiler = "1.3.0" hiltNavigationCompose = "1.3.0" hiltWork = "1.3.0" kache = "2.1.1" -kotlin = "2.3.0" -kotlinxCoroutinesCore = "1.10.2" +kotlin = "2.3.10" ksp = "2.3.5" coreKtx = "1.17.0" appcompat = "1.7.1" -composeBom = "2026.01.01" +composeBom = "2026.02.00" mockk = "1.14.9" robolectric = "4.16.1" multiplatformMarkdownRenderer = "0.39.2" @@ -25,18 +23,18 @@ timber = "5.0.1" tvFoundation = "1.0.0-alpha12" tvMaterial = "1.0.1" lifecycleRuntimeKtx = "2.10.0" -activityCompose = "1.12.3" +activityCompose = "1.12.4" androidx-media3 = "1.9.2" coil = "3.3.0" jellyfin-sdk = "1.7.1" -nav3Core = "1.0.0" +nav3Core = "1.0.1" lifecycleViewmodelNav3 = "2.10.0" material3AdaptiveNav3 = "1.0.0-alpha03" protobuf = "0.9.6" datastore = "1.2.0" kotlinx-serialization = "1.10.0" protobuf-javalite = "4.33.5" -hilt = "2.58" +hilt = "2.59.1" room = "2.8.4" preferenceKtx = "1.2.1" tvprovider = "1.1.0" @@ -83,7 +81,6 @@ hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" } kache = { module = "com.mayakapps.kache:kache", version.ref = "kache" } kache-file = { module = "com.mayakapps.kache:file-kache", version.ref = "kache" } -kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" } mockk-agent = { module = "io.mockk:mockk-agent", version.ref = "mockk" } mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" } robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } @@ -135,7 +132,6 @@ androidx-core-testing = { module = "androidx.arch.core:core-testing", version.re [plugins] android-application = { id = "com.android.application", version.ref = "agp" } -kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aaaabb3c..23449a2b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME