Conversation
Using Android Studio's AGP upgrade assistant
Using Android Studio's AGP upgrade assistant
There was a problem hiding this comment.
Pull request overview
Updates the project’s Gradle/Android build tooling to newer versions and adjusts build configuration to align with AGP 9.x behavior/toolchains.
Changes:
- Bump Gradle wrapper and version-catalog tool versions (Kotlin + AGP).
- Add Foojay toolchain resolver + introduce a daemon JVM toolchain properties file.
- Adjust shared Gradle scripts / properties for AGP 9.x defaults and remove Kotlin Android plugin application.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle | Adds Foojay toolchains resolver convention plugin. |
| gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper distribution URL. |
| gradle/libs.versions.toml | Updates Kotlin/AGP versions and modifies plugin catalog entries. |
| gradle/gradle-daemon-jvm.properties | Adds generated daemon JVM toolchain resolution configuration. |
| gradle.properties | Adds AGP 9.x-related properties and comments; minor formatting update. |
| build.module.library.gradle | Removes Kotlin Android plugin application from shared library module script. |
| build.module.feature-and-app.gradle | Removes Kotlin Android plugin application from shared feature/app module script. |
| build.gradle | Removes Kotlin Android plugin from root plugin classpath declarations. |
| build.dep.compose.gradle | Removes Kotlin Android plugin application from shared Compose deps script. |
| .idea/gradle.xml | Removes IDE-specific Gradle JVM / annotation resolution options. |
Files not reviewed (1)
- .idea/gradle.xml: Language not supported
Comments suppressed due to low confidence (1)
build.dep.compose.gradle:4
build.dep.compose.gradleconfigures Compose, but no longer applies the Kotlin Android plugin. If module-levelplugins {}doesn’t apply Kotlin, Compose compilation will fail. Ensure Kotlin Android is applied consistently (preferably once in the shared module scripts).
android {
buildFeatures {
compose = true
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| apply plugin: 'kotlin-android' | ||
|
|
||
| apply from: "$rootDir/build.config.jvm.gradle" | ||
| apply from: "$rootDir/build.dep.di.gradle" |
There was a problem hiding this comment.
Kotlin Android plugin is no longer applied anywhere in this shared module script. Since the project contains .kt sources, Android modules that apply this script will fail to compile unless you apply the Kotlin Android plugin here (e.g., org.jetbrains.kotlin.android) or apply it in each module’s plugins {} block with an explicit version available on the classpath.
| apply from: "$rootDir/build.dep.di.gradle" | |
| apply from: "$rootDir/build.dep.di.gradle" | |
| apply plugin: "org.jetbrains.kotlin.android" |
|
|
||
| apply from: "$rootDir/build.config.jvm.gradle" | ||
| apply from: "$rootDir/build.dep.di.gradle" | ||
| apply from: "$rootDir/build.dep.compose.gradle" |
There was a problem hiding this comment.
This shared script no longer applies the Kotlin Android plugin. Feature/app modules include Kotlin sources, so builds will fail unless the Kotlin Android plugin is applied (either in this script via apply plugin: or in each module’s plugins {} block).
| apply from: "$rootDir/build.dep.compose.gradle" | |
| apply from: "$rootDir/build.dep.compose.gradle" | |
| apply plugin: 'kotlin-android' |
| [plugins] | ||
| androidApplication = { id = "com.android.application", version.ref = "gradlePlugin" } | ||
| androidLibrary = { id = "com.android.library", version.ref = "gradlePlugin" } | ||
| kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } | ||
| jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
| googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } | ||
| firebaseCrashlyticsPlugin = { id = "com.google.firebase.crashlytics", version.ref = "crashlyticsPlugin" } | ||
| compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } |
There was a problem hiding this comment.
The Kotlin version/AGP version are bumped, but the version-catalog plugin entry for the Kotlin Android plugin was removed. Since modules still need org.jetbrains.kotlin.android to compile Kotlin sources, keep a kotlinAndroid/jetbrainsKotlinAndroid plugin entry (or equivalent) and apply it in each Android module.
|
|
||
| # android.dependency.excludeLibraryComponentsFromConstraints is DEPRECATED and will be removed in AGP 10.0.0 | ||
| # omitting it however, would cause AGP 9.x to output a warning | ||
| # to supress that warning, we set android.generateSyncIssueWhenLibraryConstraintsAreEnabled to false |
There was a problem hiding this comment.
Typo in comment: “supress” → “suppress”.
| # to supress that warning, we set android.generateSyncIssueWhenLibraryConstraintsAreEnabled to false | |
| # to suppress that warning, we set android.generateSyncIssueWhenLibraryConstraintsAreEnabled to false |
Why is this important?
keeping up with the times
Notes
Fixes #204