Skip to content

Update all dependencies to latest versions#524

Open
warting wants to merge 2 commits into
mainfrom
update-all-dependencies-to-latest
Open

Update all dependencies to latest versions#524
warting wants to merge 2 commits into
mainfrom
update-all-dependencies-to-latest

Conversation

@warting
Copy link
Copy Markdown
Owner

@warting warting commented Mar 8, 2026

Summary

  • 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 libraries)

Build script migrations for AGP 9 and Kotlin 2.x

  • Removed kotlin-android plugin (built into AGP 9)
  • Replaced composeOptions/kotlinCompilerExtensionVersion with kotlin.plugin.compose
  • Replaced kotlinOptions with kotlin { jvmToolchain(17) }
  • Replaced com.gradle.enterprise with pluginManagement block
  • Migrated from buildscript/classpath pattern to plugins block
  • Fixed Dokka v2 compatibility
  • Disabled deprecated Jetifier

Test plan

  • ./gradlew build passes locally (compile, lint, detekt)
  • CI passes

- 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
Comment thread app/build.gradle.kts
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

This expression contains a magic number. Consider defining it to a well named constant.
Comment thread app/build.gradle.kts
"-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

This expression contains a magic number. Consider defining it to a well named constant.
Comment thread appjava/build.gradle.kts
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

This expression contains a magic number. Consider defining it to a well named constant.

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

This expression contains a magic number. Consider defining it to a well named constant.
"-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

This expression contains a magic number. Consider defining it to a well named constant.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread gradle/publish-module.gradle Outdated
Comment on lines +36 to +37
if (comp == null) comp = components.findByName("default")
if (comp != null) from comp
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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}.")
}

Copilot uses AI. Check for mistakes.
Comment on lines 19 to 21
artifacts {
archives androidSourcesJar
archives javadocJar
}
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- Use android.publishing.singleVariant to register the release component
- Restore empty javadocJar for Maven Central compliance
- Address Copilot review feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants