chore: Gradle/AGP dependency bumps and deprecation cleanup - #3027
Open
StylianosGakis wants to merge 7 commits into
Open
chore: Gradle/AGP dependency bumps and deprecation cleanup#3027StylianosGakis wants to merge 7 commits into
StylianosGakis wants to merge 7 commits into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
by gettingapi —by getting/by creating→getByName(...)/create(...).project.project(":path")→DependencyHandler.project(String). (Fails in Gradle 10.)-Xjvm-default=all→-jvm-default=no-compatibility(identical codegen).org.jetbrains.kotlin.android; drop the AGP 9 transitional flags (android.builtInKotlin,android.newDsl,android.enableAppCompileTimeRClass,android.uniquePackageNames). The twoHedvigGradlePluginhooks that keyed off the standalone Kotlin plugin (Metro application + shared Compose BOM/logging/tracking deps) now trigger on the AGP plugins.Notes
com.android.kotlin.multiplatform.libraryplugin and are unaffected; iOS is unaffected (the removed flags are AGP-only).kotlinOptions/packagingOptions/legacy variant API/kapt/custom BuildConfig to migrate; KSP is 2.3.10.Verification
:app:assembleDebug+:app:testDebugUnitTestpass;:design-showcase:assembleDebugpasses../gradlew helpand./gradlew build --dry-run(Doctor temporarily disabled) both succeed.by getting, Project-as-dependency-notation,org.jetbrains.kotlin.android,android.newDsl/builtInKotlin,-Xjvm-default) are gone.Out of scope
Project.getPropertiesdeprecation lives inside the third-party Gradle Doctor plugin (no upstream fix available).