Update all dependencies to latest versions#524
Conversation
- Gradle 8.2 → 9.4.0
- AGP 8.2.2 → 9.1.0
- Kotlin 1.9.22 → 2.3.10
- Compose BOM 2023.10.01 → 2026.02.01
- ui-test-junit4 1.10.2 → 1.10.4
- core-ktx 1.12.0 → 1.17.0
- version-catalog-update 0.8.4 → 1.1.0
- ben-manes versions 0.51.0 → 0.53.0
- minSdk 21 → 23 (required by new Compose)
Migrated build scripts for AGP 9 and Kotlin 2.x:
- Remove kotlin-android plugin (built into AGP 9)
- Replace composeOptions with kotlin.plugin.compose
- Replace kotlinOptions with kotlin { jvmToolchain(17) }
- Replace com.gradle.enterprise with pluginManagement
- Migrate from buildscript/classpath to plugins block
- Fix Dokka v2 compatibility
- Disable deprecated Jetifier
| defaultConfig { | ||
| applicationId = "se.warting.permissionsui" | ||
| minSdk = 21 | ||
| minSdk = 23 |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
| "-Xskip-prerelease-check" | ||
| ) | ||
| kotlin { | ||
| jvmToolchain(17) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
| defaultConfig { | ||
| applicationId = "se.warting.permissionsuijava" | ||
| minSdk = 21 | ||
| minSdk = 23 |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
|
|
||
| defaultConfig { | ||
| minSdk = 21 | ||
| minSdk = 23 |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
| "-Xskip-prerelease-check" | ||
| ) | ||
| kotlin { | ||
| jvmToolchain(17) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
There was a problem hiding this comment.
Pull request overview
Updates the Android/Gradle toolchain and dependency set to newer major versions (Gradle 9 / AGP 9 / Kotlin 2.x / newer Compose BOM), including associated build-script migrations and a minSdk bump to satisfy updated Compose requirements.
Changes:
- Migrates build configuration to AGP 9/Kotlin 2.x conventions (plugins block, toolchain config, Compose plugin usage, internal API removal).
- Updates Gradle wrapper and version catalog dependency/plugin versions; disables Jetifier; raises minSdk to 23.
- Adjusts publishing script logic for Android components and removes Dokka/javadoc artifact wiring.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
settings.gradle.kts |
Switches to pluginManagement repositories and simplifies settings/build cache configuration. |
build.gradle.kts |
Moves from legacy buildscript to plugins, updates detekt config API usage, and replaces internal local.properties reader. |
gradle/wrapper/gradle-wrapper.properties |
Updates Gradle wrapper to 9.4.0. |
gradle/libs.versions.toml |
Updates toolchain/dependency/plugin versions and refactors some entries (e.g., lifecycle via shared version). |
gradle.properties |
Disables Jetifier. |
app/build.gradle.kts |
Updates Compose/Kotlin configuration approach and bumps minSdk to 23. |
appjava/build.gradle.kts |
Bumps minSdk to 23. |
permissionsui/build.gradle.kts |
Updates Compose/Kotlin configuration approach, bumps minSdk to 23, and keeps library publishing setup. |
gradle/publish-module.gradle |
Alters publication component selection and removes Dokka/javadoc jar publication wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| if (comp == null) comp = components.findByName("default") | ||
| if (comp != null) from comp |
There was a problem hiding this comment.
In the Android library publishing path, if neither the "release" nor "default" component exists, the publication will proceed without a main component (only the sources JAR gets attached). That can lead to publishing an incomplete/broken artifact. Consider failing the build when the component can’t be found, or configuring Android publishing so the expected component is always created and referenced consistently (e.g., ensure a release variant/component is registered and always from that).
| if (comp == null) comp = components.findByName("default") | |
| if (comp != null) from comp | |
| if (comp == null) { | |
| comp = components.findByName("default") | |
| } | |
| if (comp != null) { | |
| from comp | |
| } else { | |
| throw new GradleException("Android library publishing configuration error: neither 'release' nor 'default' component was found for project ${project.path}.") | |
| } |
| artifacts { | ||
| archives androidSourcesJar | ||
| archives javadocJar | ||
| } |
There was a problem hiding this comment.
The publishing script no longer produces or attaches a javadoc/javadocJar artifact. Maven Central/Sonatype commonly requires a javadoc JAR alongside the sources JAR for each published artifact; removing it may break the release/publish pipeline. Consider reintroducing a (Dokka-based or empty) javadocJar and attaching it to both artifacts {} and the Maven publication.
- Use android.publishing.singleVariant to register the release component - Restore empty javadocJar for Maven Central compliance - Address Copilot review feedback
Summary
Build script migrations for AGP 9 and Kotlin 2.x
kotlin-androidplugin (built into AGP 9)composeOptions/kotlinCompilerExtensionVersionwithkotlin.plugin.composekotlinOptionswithkotlin { jvmToolchain(17) }com.gradle.enterprisewithpluginManagementblockbuildscript/classpathpattern topluginsblockTest plan
./gradlew buildpasses locally (compile, lint, detekt)