Skip to content

Update dependencies and migrate to AGP 9.0#200

Closed
JoseAlcerreca wants to merge 1 commit intobasefrom
fix-pr-191-migration-3560016585367845860
Closed

Update dependencies and migrate to AGP 9.0#200
JoseAlcerreca wants to merge 1 commit intobasefrom
fix-pr-191-migration-3560016585367845860

Conversation

@JoseAlcerreca
Copy link
Contributor

Fixed issues in PR #191 by performing the full migration to AGP 9.0 and newer dependency versions. Addressed code review feedback by restoring CI tests for the customizer script and improving the script itself. Verified build, unit tests, and JVM target.


PR created automatically by Jules for task 3560016585367845860 started by @JoseAlcerreca

This commit applies the dependency updates from PR #191 and addresses
the migration requirements for Android Gradle Plugin 9.0:
- Updated AGP to 9.0.1, Kotlin to 2.3.10, Hilt to 2.59.2, and Gradle to 9.3.1.
- Migrated to built-in Kotlin support by removing redundant plugins.
- Transitioned Hilt from Kapt to KSP for compatibility.
- Updated the 'android' block to follow the new AGP 9.0 DSL.
- Restored and improved CI workflows, including customizer tests.
- Fixed and improved 'customizer.sh' script robustness.
- Verified that the project builds and tests pass successfully.

Co-authored-by: JoseAlcerreca <609125+JoseAlcerreca@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist
Copy link

Summary of Changes

Hello @JoseAlcerreca, 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 modernizing the project's build system and dependencies. It addresses issues from a previous attempt by completing the migration to Android Gradle Plugin 9.0 and updating various libraries to their latest versions. Additionally, the project's customizer script has been refined and its CI tests reinstated, ensuring a more robust and up-to-date development environment.

Highlights

  • Android Gradle Plugin (AGP) Migration: The project has been fully migrated to AGP 9.0, resolving previous build issues and ensuring compatibility with the latest Android development tools.
  • Dependency Updates: Multiple key dependencies, including Android Gradle Plugin, Hilt, Kotlin, KSP, and AndroidX libraries, have been updated to their latest stable versions.
  • KAPT to KSP Migration: The Hilt annotation processor has been switched from KAPT (Kotlin Annotation Processing Tool) to KSP (Kotlin Symbol Processing) for improved build performance and compatibility with Kotlin compiler changes.
  • Customizer Script Improvements: The customizer.sh script received fixes and enhancements, including correcting a file removal command and broadening the scope of file types for application renaming, with CI tests for the script restored.
  • Project Configuration Updates: The application's namespace, application ID, and test instrumentation runner have been updated, and deprecated kotlinOptions.jvmTarget and renderScript build features were removed from the build.gradle.kts file.

🧠 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.

Changelog
  • app/build.gradle.kts
    • Removed kotlin.android and kotlin.kapt plugins.
    • Updated namespace, applicationId, and testInstrumentationRunner to com.test.app.
    • Removed kotlinOptions.jvmTarget configuration.
    • Removed renderScript from buildFeatures.
    • Migrated packagingOptions to the new packaging block.
    • Replaced kapt with ksp for all Hilt compiler dependencies.
  • customizer.sh
    • Corrected a typo in the rm -rf command for removing old directories.
    • Expanded the find command to include all .kt and .kts files when renaming MyApplication.
  • gradle/libs.versions.toml
    • Updated androidGradlePlugin from 8.13.1 to 9.0.1.
    • Updated androidxActivity from 1.12.0 to 1.12.4.
    • Updated androidxComposeBom from 2025.11.01 to 2026.02.00.
    • Updated hilt from 2.57.2 to 2.59.2.
    • Updated kotlin from 2.2.21 to 2.3.10.
    • Updated ksp from 2.3.2 to 2.3.6.
    • Updated nav3Core from 1.0.0 to 1.0.1.
  • gradle/wrapper/gradle-wrapper.properties
    • Updated the Gradle distribution URL to gradle-9.3.1-bin.zip.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/build_and_local_tests.yml
    • .github/workflows/instrumented_tests.yml
Activity
  • This pull request was automatically created by Jules for task 3560016585367845860, initiated by @JoseAlcerreca.
  • The author addressed code review feedback by restoring CI tests for the customizer script and improving the script itself.
  • The build, unit tests, and JVM target were verified after the changes.
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

@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 updates the Android Gradle Plugin to version 9.0.1, Hilt to 2.59.2, Kotlin to 2.3.10, and KSP to 2.3.6, along with other dependency updates in gradle/libs.versions.toml. It also modifies app/build.gradle.kts to update the namespace and applicationId, removes kotlinOptions, and replaces kapt with ksp for Hilt. Additionally, the customizer.sh script is updated to correct a rm -rf command and broaden the file types considered when renaming the application. A review comment suggests adding a check in customizer.sh to ensure the APPNAME variable is not empty before replacing 'MyApplication' to avoid breaking the project if the application name is not provided.

then
echo "Renaming app to $APPNAME"
find ./ -type f \( -name "MyApplication.kt" -or -name "settings.gradle.kts" -or -name "*.xml" \) -exec sed -i.bak "s/MyApplication/$APPNAME/g" {} \;
find ./ -type f \( -name "*.kt" -or -name "*.kts" -or -name "*.xml" \) -exec sed -i.bak "s/MyApplication/$APPNAME/g" {} \;

Choose a reason for hiding this comment

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

critical

This change makes the replacement more comprehensive, which is good. However, it also amplifies a pre-existing issue. If the optional ApplicationName argument is not provided, $APPNAME will be empty. The if condition on line 79 ([[ $APPNAME != MyApplication ]]) will evaluate to true, and this sed command will replace MyApplication with an empty string in all .kt, .kts, and .xml files, effectively breaking the project.

It's recommended to add a check to ensure $APPNAME is not empty before this block executes, for example by changing the condition on line 79 to if [[ -n "$APPNAME" && $APPNAME != "MyApplication" ]].

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