Skip to content

Conversation

@liutikas
Copy link
Contributor

  • Upgrade to Gradle 9.3.0
  • Upgrade to Hilt 2.59
  • Upgrade to Baseline Profile plugin 1.5.0-alpha01
  • Upgrade to Google OSS plugin 0.10.10
  • Upgrade to Kotlin 2.3.0
  • Upgrade to KSP 2.3.4
  • Adapt to built-in kotlin in AGP
  • Add a missing bom entry in :watchface
  • Ensure that we dont use transtive deps in :wear APK copying

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @liutikas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a comprehensive upgrade of the project's build infrastructure, primarily migrating to Android Gradle Plugin 9.0.0 and Gradle 9.3.0. This foundational update involves bumping numerous associated dependencies, including Kotlin, Hilt, and various plugins, and adapting the build configuration to align with new AGP features like built-in Kotlin support. Additionally, it refines specific module configurations related to asset handling and dependency transitivity, ensuring the project remains robust and compatible with the latest Android development toolchain.

Highlights

  • Android Gradle Plugin Upgrade: The Android Gradle Plugin (AGP) has been upgraded from version 8.13.1 to 9.0.0, marking a significant update to the project's build system.
  • Gradle Wrapper Update: The Gradle Wrapper has been updated to version 9.3.0, ensuring compatibility and leveraging the latest build tool features.
  • Kotlin Ecosystem Updates: Kotlin has been updated to version 2.3.0, KSP to 2.3.4, and Kotlinx Serialization to 2.3.0, bringing the project up to date with the latest Kotlin language and related tools.
  • Dependency Upgrades: Several key dependencies have been upgraded, including Hilt (2.57.2 to 2.59), Baseline Profile plugin (1.4.1 to 1.5.0-alpha01), and Google OSS plugin (0.10.9 to 0.10.10).
  • Adaptation to Built-in Kotlin Support: Explicit application of the org.jetbrains.kotlin.android plugin has been removed from benchmark/build.gradle.kts and the custom build plugins (AndroidApplicationPlugin.kt, AndroidLibraryPlugin.kt), as AGP 9.0.0 now provides built-in Kotlin support.
  • Gradle Properties Configuration: The gradle.properties file now includes android.sourceset.disallowProvider=false, which is necessary to accommodate changes in how asset source directories are configured with the new AGP version.
  • Watchface Module Dependency Fix: A missing androidx.compose.bom platform dependency has been added to the watchface module's androidTestImplementation block to ensure proper Compose BOM resolution during testing.
  • Wear Module Transitive Dependency Control: The watchfaceApk configuration in the wear module now explicitly sets isTransitive = false to prevent unintended transitive dependencies from being included during APK copying.
  • Gradle Wrapper Script Enhancements: The gradlew and gradlew.bat scripts have been updated with improved POSIX compliance, error handling, and modern shell practices, reflecting changes from the Gradle project.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades several key dependencies, including Android Gradle Plugin to 9.0.0, Gradle to 9.3.0, and Kotlin to 2.3.0. The changes correctly adapt the build scripts to these new versions, such as removing the explicit application of the Kotlin Android plugin, which is now bundled with AGP. The Gradle wrapper scripts (gradlew and gradlew.bat) have also been updated to the new standard versions. My review identified a couple of critical issues in the updated gradlew script related to incorrect quoting of shell variables, which could cause script failures on certain platforms. I've provided suggestions to fix these. The rest of the changes look good and are consistent with the goals of the pull request.

@liutikas liutikas force-pushed the agp9.0.0 branch 3 times, most recently from 8e7579c to 878f52f Compare January 22, 2026 23:16
tasks.named("pre${capsVariant}Build").configure {
dependsOn(tokenTask)
}
apkFileCollection.from(configurations.getByName("watchfaceApk$capsVariant"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

@garanj can you review this change since its watchface related?

@riggaroo
Copy link
Collaborator

@dturner are you hearing of any issues with Nav3 and AGP 9?
With @liutikas proposed change here, I'm getting a runtime crash, even tried updating all dependencies but there doesn't seem to be a new dependency for nav3: #193


2026-01-23 10:10:52.904 19121-19121 AndroidRuntime          com.android.developers.androidify    E  FATAL EXCEPTION: main (Fix with AI)
                                                                                                    Process: com.android.developers.androidify, PID: 19121
                                                                                                    java.lang.NoSuchMethodError: No static method rememberViewModelStoreNavEntryDecorator(Landroidx/lifecycle/ViewModelStoreOwner;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;II)Landroidx/navigation3/runtime/NavEntryDecorator; in class Landroidx/lifecycle/viewmodel/navigation3/ViewModelStoreNavEntryDecoratorKt; or its super classes (declaration of 'androidx.lifecycle.viewmodel.navigation3.ViewModelStoreNavEntryDecoratorKt' appears in /data/app/~~50yEKRCcI6Y7liKbK27RxA==/com.android.developers.androidify-aQPln0gPtO0ak6dP0AbaZw==/base.apk)
                                                                                                    	at com.android.developers.androidify.navigation.MainNavigationKt.MainNavigation(MainNavigation.kt:69)
                                                                                                    	at com.android.developers.androidify.ComposableSingletons$MainActivityKt.lambda__1200648287$lambda$0(MainActivity.kt:62)
                                                                                                    	at com.android.developers.androidify.ComposableSingletons$MainActivityKt$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:122)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:52)
                                                                                                    	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:398)
                                                                                                    	at com.android.developers.androidify.MainActivity.onCreate$lambda$0$0(MainActivity.kt:61)
                                                                                                    	at com.android.developers.androidify.MainActivity.$r8$lambda$vy3iED7wUkwWl3H5TIdzJ_lbBS0(Unknown Source:0)
                                                                                                    	at com.android.developers.androidify.MainActivity$$ExternalSyntheticLambda2.invoke(D8$$SyntheticClass:0)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:122)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:52)
                                                                                                    	at com.android.developers.androidify.theme.ThemeKt.AndroidifyTheme$lambda$0$0$0(Theme.kt:87)
                                                                                                    	at com.android.developers.androidify.theme.ThemeKt.$r8$lambda$luXmuJ3mNBKf6UlOFYulAjU7nBo(Unknown Source:0)
                                                                                                    	at com.android.developers.androidify.theme.ThemeKt$$ExternalSyntheticLambda2.invoke(D8$$SyntheticClass:0)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:122)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:52)
                                                                                                    	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:398)
                                                                                                    	at com.android.developers.androidify.theme.ThemeKt.AndroidifyTheme$lambda$0$0(Theme.kt:86)
                                                                                                    	at com.android.developers.androidify.theme.ThemeKt.$r8$lambda$7i0GwH9HRz8lwapzXiZUmIfnffI(Unknown Source:0)
                                                                                                    	at com.android.developers.androidify.theme.ThemeKt$$ExternalSyntheticLambda3.invoke(D8$$SyntheticClass:0)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:131)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:52)
                                                                                                    	at androidx.compose.animation.SharedTransitionScopeKt$SharedTransitionLayout$1.invoke(SharedTransitionScope.kt:125)
                                                                                                    	at androidx.compose.animation.SharedTransitionScopeKt$SharedTransitionLayout$1.invoke(SharedTransitionScope.kt:122)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:143)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:52)
                                                                                                    	at androidx.compose.animation.SharedTransitionScopeKt$SharedTransitionScope$1.invoke(SharedTransitionScope.kt:147)
                                                                                                    	at androidx.compose.animation.SharedTransitionScopeKt$SharedTransitionScope$1.invoke(SharedTransitionScope.kt:144)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:131)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:52)
                                                                                                    	at androidx.compose.ui.layout.LookaheadScopeKt.LookaheadScope(LookaheadScope.kt:61)
                                                                                                    	at androidx.compose.animation.SharedTransitionScopeKt.SharedTransitionScope(SharedTransitionScope.kt:144)
                                                                                                    	at androidx.compose.animation.SharedTransitionScopeKt.SharedTransitionLayout(SharedTransitionScope.kt:122)
2026-01-23 10:10:52.904 19121-19121 AndroidRuntime          com.android.developers.androidify    E  	at com.android.developers.androidify.theme.ThemeKt.AndroidifyTheme$lambda$0(Theme.kt:85) (Fix with AI)

@dturner
Copy link
Contributor

dturner commented Jan 23, 2026

@riggaroo Just in case anyone else runs into the issue, the fix was to update to the latest version of androidx.lifecycle:lifecycle-viewmodel-navigation3.

lifecycleViewmodelNavigation3 = "2.10.0"

dturner and others added 2 commits January 23, 2026 11:16
Upgrade lifecycleViewmodelNavigation3 to 2.10.0
- Upgrade to Gradle 9.3.0
- Upgrade to Hilt 2.59
- Upgrade to Baseline Profile plugin 1.5.0-alpha01
- Upgrade to Google OSS plugin 0.10.10
- Upgrade to Kotlin 2.3.0
- Upgrade to KSP 2.3.4
- Adapt to built-in kotlin in AGP
- Add a missing bom entry in :watchface
- Ensure that we dont use transtive deps in :wear APK copying
- Disable built-in kotlin in :wear:watchface
- Rewrite :wear tasks that add generated APK and XML resources
- Add kotlin.test dependency to :feature:creation, see https://issuetracker.google.com/issues/478268626
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