chore: update all dependencies to latest versions#165
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- AGP 8.8.0 → 9.1.0 (migrate to built-in Kotlin, remove kotlin-android plugin) - Kotlin 2.1.10 → 2.3.10 - Gradle wrapper 8.12.1 → 9.4.0 - compileSdk 35 → 36, minSdk 21 → 23, jvmTarget 11 → 17 - AndroidX: activity 1.10.0→1.12.4, core 1.15.0→1.17.0, appcompat 1.7.0→1.7.1, fragment 1.8.5→1.8.9, test-core 1.6.1→1.7.0, test-runner 1.6.2→1.7.0 - Remove deprecated android.defaults.buildfeatures.* properties - Add robolectric.properties (sdk=35) for all test modules - Remove deprecated kotlinOptions in favor of AGP 9 compilerOptions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review Summary by QodoUpdate all dependencies to latest versions with AGP 9 migration
WalkthroughsDescription• Update AGP 8.8.0 → 9.1.0 with built-in Kotlin support • Migrate from deprecated kotlinOptions to AGP 9 compilerOptions • Upgrade Kotlin 2.1.10 → 2.3.10, Gradle 8.12.1 → 9.4.0 • Raise compileSdk 35 → 36, minSdk 21 → 23, jvmTarget 11 → 17 • Update AndroidX libraries and add Robolectric SDK 35 configuration Diagramflowchart LR
AGP["AGP 8.8.0"] -- "upgrade to 9.1.0" --> AGP9["AGP 9.1.0"]
KotlinOpts["kotlinOptions DSL"] -- "migrate to" --> CompilerOpts["compilerOptions"]
Kotlin["Kotlin 2.1.10"] -- "upgrade to" --> Kotlin2["Kotlin 2.3.10"]
Gradle["Gradle 8.12.1"] -- "upgrade to" --> Gradle9["Gradle 9.4.0"]
SDK["SDK 35"] -- "upgrade to" --> SDK36["SDK 36"]
MinSDK["minSdk 21"] -- "upgrade to" --> MinSDK23["minSdk 23"]
JVM["jvmTarget 11"] -- "upgrade to" --> JVM17["jvmTarget 17"]
File Changes1. gradle/conventions-plugins/vbpd-library-base/src/main/kotlin/dev/androidbroadcast/vbpd/gradle/BaseExtensions.kt
|
Code Review by Qodo
1. jvmTarget set to 17
|
| kotlin = "2.3.10" | ||
| vanniktechMavenPublish = "0.30.0" | ||
| jvmTarget = "11" | ||
| jvmTarget = "17" |
There was a problem hiding this comment.
1. jvmtarget set to 17 📘 Rule violation ✓ Correctness
The version catalog sets jvmTarget to 17, which violates the requirement to keep JVM bytecode/targets at 11. This can cause modules to compile for Java 17, breaking consumers and violating the mandated JVM level.
Agent Prompt
## Issue description
The PR configures `jvmTarget` as 17, but compliance requires Java/Kotlin bytecode target 11 across all JVM modules.
## Issue Context
`libs.versions.jvmTarget` is used by module build scripts (e.g., sample `compileOptions`) so changing it to 17 effectively makes the project compile for Java 17.
## Fix Focus Areas
- gradle/libs.versions.toml[15-15]
- sample/build.gradle.kts[19-22]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
AGP 9.x requires JVM 17+ — jvmTarget=11 is not compatible with AGP 9. This is not a rule violation, the old value was simply the previous project setting that needed to be updated along with the AGP major upgrade.
There was a problem hiding this comment.
Question:
AGP 9.x requires JVM 17+ — jvmTarget=11 is not compatible with AGP 9. This is not a rule violation, the old value was simply the previous project setting that needed to be updated along with the AGP major upgrade.
Answer:
You can reduce/avoid this kind of “false violation” by adding a repository-specific constraint to the agent prompt so it won’t recommend (or insist on) downgrading JVM bytecode targets when AGP 9.x is in use.
Add an explicit instruction that:
- AGP 9.x implies JDK/JVM target 17+ (so don’t flag “jvmTarget=17” as a violation)
- Only flag JVM target mismatches if they contradict an explicitly stated project policy in-repo
Suggested config (TOML):
[pr_code_suggestions]
extra_instructions = """\
- This repo uses Android Gradle Plugin (AGP) 9.x; therefore Java/Kotlin toolchain and jvmTarget are expected to be 17+.
- Do NOT suggest changing jvmTarget back to 11 just to match historical settings.
- Only raise a “rule/policy violation” if an explicit, authoritative repo policy file (e.g., best_practices.md / compliance checklist / build conventions) states a different required target.
- If there is a conflict (e.g., consumers require 11), present it as a trade-off with options (multi-module targets, toolchains, publishing strategy), not as an unconditional violation.
"""
[pr_reviewer]
extra_instructions = """\
- Treat jvmTarget=17 as acceptable when AGP 9.x is present; avoid calling it a compliance violation unless an explicit repo policy mandates 11.
"""If this feedback is coming from the /compliance tool (rather than /improve or /review), the most robust fix is to update your pr_compliance_checklist.yaml to reflect the AGP 9.x baseline (17+) instead of 11.
Relevant Sources:
- https://docs.qodo.ai/qodo-documentation/code-review/qodo-merge/tools/improve#extra-instructions-and-best-practices
- https://docs.qodo.ai/qodo-documentation/code-review/qodo-merge/tools/review#extra-instructions
- https://docs.qodo.ai/qodo-documentation/code-review/qodo-merge/usage-guide/additional_configurations#extra-instructions
- https://docs.qodo.ai/qodo-documentation/code-review/qodo-merge/tools/compliance#custom-compliance
| targetCompatibility = javaVersion | ||
| } | ||
|
|
||
| kotlinOptions { |
There was a problem hiding this comment.
2. Kotlin jvm target lost 🐞 Bug ✓ Correctness
The PR removes kotlinOptions { jvmTarget = ... } but does not replace it with Kotlin
compilerOptions JVM target configuration, so Kotlin bytecode target is no longer pinned to the
repo’s intended jvmTarget=17 while Java is compiled for 17. This can produce mixed classfile targets
and can fail builds under stricter Kotlin JVM target validation or when using JVM-17-only bytecode
features.
Agent Prompt
### Issue description
Kotlin `jvmTarget` is no longer configured after removing `kotlinOptions { jvmTarget = ... }`. `jvmToolchain(17)` only selects the JDK used for compilation; it does not guarantee Kotlin bytecode is emitted for JVM 17.
### Issue Context
- Version catalog defines `jvmTarget = 17`.
- Java compilation is configured for 17.
- Kotlin configuration currently only sets toolchain.
### Fix Focus Areas
- gradle/conventions-plugins/vbpd-library-base/src/main/kotlin/vbpdconfig.gradle.kts[37-53]
- sample/build.gradle.kts[1-23]
- gradle/conventions-plugins/vbpd-library-base/src/main/kotlin/dev/androidbroadcast/vbpd/gradle/BaseExtensions.kt[22-28]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
jvmToolchain(17) in Kotlin 1.7+ sets both the JDK toolchain AND the jvmTarget. Additionally, AGP 9's built-in Kotlin aligns the Kotlin target with compileOptions Java target. Both are configured to 17 — the Kotlin jvmTarget is not lost.
There was a problem hiding this comment.
Question:
jvmToolchain(17) in Kotlin 1.7+ sets both the JDK toolchain AND the jvmTarget. Additionally, AGP 9's built-in Kotlin aligns the Kotlin target with compileOptions Java target. Both are configured to 17 — the Kotlin jvmTarget is not lost.
Answer:
You can mitigate this kind of Gradle/Kotlin false-positive by adding explicit guidance via extra_instructions so the model verifies the effective Kotlin bytecode target before flagging “jvmTarget lost”, and treats jvmToolchain(...) / AGP alignment as acceptable evidence when applicable.
Add this to your repo (wiki/local/global) .pr_agent.toml:
[pr_code_suggestions]
extra_instructions = """\
When reviewing Gradle/Kotlin configuration changes:
- Do NOT claim 'Kotlin jvmTarget is lost' just because `kotlinOptions { jvmTarget = ... }` was removed.
- First verify whether Kotlin bytecode target is still effectively pinned via `jvmToolchain(<version>)`, Kotlin `compilerOptions`, or Android/AGP alignment with `compileOptions`.
- If the effective target remains consistent with Java (e.g., 17), do not open a bug; at most ask a clarifying question and cite the exact build files/lines that prove mismatch.
- Only raise a correctness bug when you can point to concrete evidence of mixed targets (Java 17 vs Kotlin != 17) in the diff/config.
"""If this issue is being raised by /review rather than /improve, add the same idea there too:
[pr_reviewer]
extra_instructions = """\
For Gradle/Kotlin JVM target topics, verify the effective Kotlin bytecode target (toolchain/compilerOptions/AGP alignment) before claiming mismatch. Only flag when the diff shows concrete evidence of Kotlin target != Java target.
"""To help you iterate, you can run:
/improve --config.output_relevant_configurations=true
to confirm which settings are actually applied.
Relevant Sources:
- https://docs.qodo.ai/qodo-documentation/code-review/qodo-merge/tools/improve#extra-instructions-and-best-practices
- https://docs.qodo.ai/qodo-documentation/code-review/qodo-merge/tools/review#configuration-options
- https://docs.qodo.ai/qodo-documentation/code-review/qodo-merge/usage-guide/additional_configurations#extra-instructions
- https://docs.qodo.ai/qodo-documentation/code-review/qodo-merge/usage-guide/additional_configurations#show-possible-configurations
There was a problem hiding this comment.
Pull request overview
This is a comprehensive dependency update PR that upgrades AGP from 8.8.0 to 9.1.0, Kotlin from 2.1.10 to 2.3.10, and Gradle from 8.12.1 to 9.4.0. The migration takes advantage of AGP 9's built-in Kotlin support by removing the separate kotlin-android plugin application and deprecated kotlinOptions blocks. Breaking changes include raising minSdk from 21 to 23 and jvmTarget from 11 to 17.
Changes:
- Bumped all major build tool versions (AGP 9.1.0, Kotlin 2.3.10, Gradle 9.4.0) and AndroidX dependencies, with corresponding SDK and JVM target adjustments
- Removed
kotlin-androidplugin application and deprecatedkotlinOptionsblocks in favor of AGP 9's built-in Kotlin support andkotlinConfig/jvmToolchain - Added
robolectric.properties(sdk=35) for all test modules to work around Robolectric not yet supporting SDK 36, and cleaned up deprecated gradle properties
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
gradle/libs.versions.toml |
Version bumps for AGP, Kotlin, AndroidX libraries, compileSdk, minSdk, jvmTarget |
gradle/wrapper/gradle-wrapper.properties |
Gradle wrapper updated to 9.4.0 |
gradle/conventions-plugins/.../vbpdconfig.gradle.kts |
Removed kotlin-android plugin application and kotlinOptions block |
gradle/conventions-plugins/.../BaseExtensions.kt |
Removed kotlinOptions extension function and its import |
sample/build.gradle.kts |
Removed kotlin-android plugin and kotlinOptions block |
gradle.properties |
Removed deprecated android.defaults.buildfeatures.* properties |
vbpd/src/test/resources/robolectric.properties |
New file pinning Robolectric to SDK 35 |
vbpd-core/src/test/resources/robolectric.properties |
New file pinning Robolectric to SDK 35 |
vbpd-reflection/src/test/resources/robolectric.properties |
New file pinning Robolectric to SDK 35 |
.gitignore |
Added .worktrees/ directory |
💡 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.
| targetCompatibility = javaVersion | ||
| } | ||
|
|
||
| kotlinOptions { | ||
| jvmTarget = libs.versions.jvmTarget.get() | ||
| freeCompilerArgs += listOf("-module-name", libraryId) | ||
| } | ||
|
|
||
| testOptions { | ||
| unitTests { | ||
| isIncludeAndroidResources = true |
There was a problem hiding this comment.
The -module-name free compiler argument that was previously set in the kotlinOptions block has been dropped and not migrated. This argument set a custom Kotlin module name (e.g., dev.androidbroadcast.vbpd.core) for each published library module, which prevents Kotlin module name clashes when consumers depend on multiple modules from this library.
The equivalent should be added in the kotlinConfig block using compilerOptions, e.g., compilerOptions { freeCompilerArgs.addAll("-module-name", libraryId) }.
There was a problem hiding this comment.
AGP 9 automatically sets -module-name from the namespace property, which is already set to libraryId in this convention plugin (line 19). Verified: compilation produces no warnings, and the module names match the previous values. Adding it manually caused a "passed multiple times" warning with AGP 9.
Summary
kotlin-androidplugin, deprecatedkotlinOptions)android.defaults.buildfeatures.*properties fromgradle.propertiesrobolectric.properties(sdk=35) for all test modules (Robolectric doesn't yet support SDK 36)Breaking changes
androidx.activity:1.12.xTest plan
./gradlew checkpasses (build + unit tests + detekt + ktlint)🤖 Generated with Claude Code