Skip to content

chore: Gradle/AGP dependency bumps and deprecation cleanup - #3027

Open
StylianosGakis wants to merge 7 commits into
developfrom
chore/gradle-updates
Open

chore: Gradle/AGP dependency bumps and deprecation cleanup#3027
StylianosGakis wants to merge 7 commits into
developfrom
chore/gradle-updates

Conversation

@StylianosGakis

Copy link
Copy Markdown
Member

What

Dependency-bump housekeeping plus the Gradle 9 / AGP 9 deprecation cleanup that the bump surfaced. This is the non-Apollo subset of Renovate PR #2886 (the Apollo 5.0 major bump is deliberately excluded, it deserves its own PR), followed by the deprecation fixes.

Commits

  • Bump versions — the non-Apollo dependency + GitHub Actions bumps from Update all dependencies #2886 (kotlinter, jetbrainsMarkdown, classgraph, dependencyAnalysis, okio, develocity, and the workflow action versions). Apollo stays at 4.4.3.
  • Stop using deprecated gradle by getting apiby getting/by creatinggetByName(...)/create(...).
  • Stop using deprecated Project-as-dependency-notation in convention pluginproject.project(":path")DependencyHandler.project(String). (Fails in Gradle 10.)
  • Remove dead kotlin.native.cacheKind property — no-op since Kotlin 2.3.20.
  • Use stabilized -jvm-default compiler flag-Xjvm-default=all-jvm-default=no-compatibility (identical codegen).
  • Migrate Android modules to AGP built-in Kotlin — stop applying org.jetbrains.kotlin.android; drop the AGP 9 transitional flags (android.builtInKotlin, android.newDsl, android.enableAppCompileTimeRClass, android.uniquePackageNames). The two HedvigGradlePlugin hooks that keyed off the standalone Kotlin plugin (Metro application + shared Compose BOM/logging/tracking deps) now trigger on the AGP plugins.

Notes

  • KMP modules use the separate com.android.kotlin.multiplatform.library plugin and are unaffected; iOS is unaffected (the removed flags are AGP-only).
  • Checked against the AGP 9 upgrade skill: no kotlinOptions/packagingOptions/legacy variant API/kapt/custom BuildConfig to migrate; KSP is 2.3.10.

Verification

  • Full module graph compiles; :app:assembleDebug + :app:testDebugUnitTest pass; :design-showcase:assembleDebug passes.
  • ./gradlew help and ./gradlew build --dry-run (Doctor temporarily disabled) both succeed.
  • All targeted deprecation warnings (by getting, Project-as-dependency-notation, org.jetbrains.kotlin.android, android.newDsl/builtInKotlin, -Xjvm-default) are gone.

Out of scope

  • Apollo 4.4.3 → 5.0.1 (major, separate PR).
  • Project.getProperties deprecation lives inside the third-party Gradle Doctor plugin (no upstream fix available).

…ugin

Replace project.project(":path") with the Kotlin DSL DependencyHandler.project(String)
at the Apollo, navKeys, and viewModels wiring sites. Passing a Project object as a
dependency notation is deprecated in Gradle 9 and fails in Gradle 10.
The property was removed in Kotlin 2.3.20 and is now a no-op that only emits a
deprecation warning. Disabling the native cache now requires the new DSL.
-Xjvm-default is deprecated in favor of the stabilized -jvm-default. -Xjvm-default=all
maps to -jvm-default=no-compatibility (same codegen: default impls in interfaces, no
DefaultImpls/bridges).
AGP 9 provides Kotlin compilation itself, so stop applying org.jetbrains.kotlin.android
in the application and library convention plugins and drop the AGP 9 transitional opt-out
flags from gradle.properties (android.builtInKotlin, android.newDsl,
android.enableAppCompileTimeRClass, android.uniquePackageNames), letting the AGP 9
defaults apply.

Because the standalone Kotlin plugin no longer applies to Android modules, the two places
that keyed off it in HedvigGradlePlugin now trigger on the AGP plugins instead:
Metro application and the shared implementation dependencies (Compose BOM, logging,
tracking). Without this the Compose BOM never reached Android modules and their
versionless Compose dependencies failed to resolve.
@StylianosGakis
StylianosGakis requested a review from a team as a code owner July 29, 2026 14:09
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.

1 participant