Conversation
Summary of ChangesHello, 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 primarily focuses on upgrading the project's build system to Android Gradle Plugin (AGP) version 9.1.0. This major version bump necessitated a comprehensive refactoring of the custom Gradle convention plugins and module-level build scripts to adapt to the new AGP APIs and updated Kotlin Multiplatform configurations. The changes streamline the build process and ensure compatibility with the latest Android development tools. Highlights
🧠 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 AssistThe 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
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 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the project to use Android Gradle Plugin 9. This is a significant undertaking that touches most of the build scripts. The changes correctly adapt to many new APIs in AGP and the Kotlin Multiplatform plugin, such as the new source set layout and extension configurations.
However, there are a few critical issues and regressions. Several benchmark and generator modules have their dependencies commented out, which will break the build. There's also a regression in the Kotlin compiler configuration, where important settings like allWarningsAsErrors are no longer applied consistently. I've left specific comments with suggestions on how to address these points.
I am having trouble creating individual review comments. Click here to see my feedback.
algorithm-benchmark/build.gradle.kts (50-62)
The dependencies for this module have been commented out instead of being migrated. This will cause the build to fail. Please migrate the dependencies to the new format required by AGP 9.
For example, the KMP sourceSets dependencies should be mapped to the appropriate Gradle configurations (implementation, testImplementation, androidTestImplementation).
This seems to be an issue in other benchmark and generator modules as well, such as app-baseline-profile-generator, app-benchmark, and wear-baseline-profile-generator.
build-logic/convention/src/main/kotlin/com/alexvanyo/composelife/buildlogic/Kotlin.kt (31-45)
This block containing common Kotlin compiler settings, including allWarningsAsErrors.set(true), has been removed. While some of these settings were moved to AndroidLibraryConventionPlugin, they are no longer applied to application modules, and allWarningsAsErrors is not applied anywhere.
This is a regression that lowers code quality standards. Please restore this configuration for all Kotlin modules. You might need to adjust how it's applied to work with AGP 9, for example by configuring the kotlin extension in both AndroidApplicationConventionPlugin and AndroidLibraryConventionPlugin.
app/build.gradle.kts (125-129)
The compileOnly dependencies for androidInstrumentedTest (apiGuardian.api and google.autoValue.annotations) have been removed during the migration. If these are still required for instrumentation tests, they should be added back, likely using the androidTestCompileOnly configuration.
build-logic/convention/src/main/kotlin/com/alexvanyo/composelife/buildlogic/Testing.kt (114-121)
This logic, which prevents running instrumentation tests when useSharedTest is configured for Robolectric-only, has been commented out. This is a regression in build validation. While the comment mentions needing a new Gradle API, is there an alternative way to enforce this check with AGP 9? If not, this should be tracked to be fixed later.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3259 +/- ##
============================================
- Coverage 73.09% 69.15% -3.95%
============================================
Files 282 282
Lines 14451 14451
Branches 2037 2034 -3
============================================
- Hits 10563 9993 -570
- Misses 2827 3450 +623
+ Partials 1061 1008 -53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.