Skip to content

Finalize bump agp 9.0 (enable newDsl)#2054

Merged
liutikas merged 4 commits intoandroid:mainfrom
Jaehwa-Noh:finalize-bump-agp-9-0
Jan 27, 2026
Merged

Finalize bump agp 9.0 (enable newDsl)#2054
liutikas merged 4 commits intoandroid:mainfrom
Jaehwa-Noh:finalize-bump-agp-9-0

Conversation

@Jaehwa-Noh
Copy link
Contributor

What I have done and why

Finally enable newDsl that bump AGP 9.0 totally.

Change-Id: I9f4174946f043c79bba9a669655f6654036b5679
Change-Id: I20ca1f71610f26a18d4573b3122994bc32c18723
Change-Id: Ifb855133593f64771e81f60b96c3e34d946dac8f
@Jaehwa-Noh Jaehwa-Noh requested a review from dturner as a code owner January 27, 2026 13:22
@gemini-code-assist
Copy link

Summary of Changes

Hello @Jaehwa-Noh, 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 finalizes the integration of Android Gradle Plugin 9.0 by enabling its new DSL. It resolves previous compatibility issues by updating the protobuf Gradle plugin and adapting the build configuration of the core/datastore-proto module to be fully compatible with the latest AGP features and the new DSL syntax. This ensures the project can leverage the most recent build system improvements.

Highlights

  • Android Gradle Plugin (AGP) New DSL Enabled: The android.newDsl=false flag has been removed from gradle.properties, fully enabling the new DSL for Android Gradle Plugin 9.0, which was previously a blocker.
  • Protobuf Gradle Plugin Update: The protobufPlugin dependency has been updated from version 0.9.5 to 0.9.6 in gradle/libs.versions.toml, addressing a known blocker for the new AGP DSL.
  • Core Datastore Module Build Configuration Refactor: The core/datastore-proto/build.gradle.kts file has been updated to use the nowinandroid.jvm.library plugin instead of nowinandroid.android.library, and its protobuf task configuration syntax has been modernized to align with recent Gradle and plugin changes.

🧠 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

@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 successfully finalizes the bump to AGP 9.0 by enabling the newDsl feature. The changes include migrating the core/datastore-proto module from an Android library to a JVM library, removing the now-unnecessary android configuration block, and updating the protobuf plugin version to 0.9.6. Additionally, the Gradle build script for protobuf task configuration was improved by using configureEach and named for better performance and correctness. All changes are well-aligned with the pull request's objective.

Change-Id: I3df518dd4a5f37ba7ca6e568914783b1ea417fce
@Jaehwa-Noh Jaehwa-Noh changed the title Finalize bump agp 9 0 (enable newDsl) Finalize bump agp 9.0 (enable newDsl) Jan 27, 2026
@Jaehwa-Noh
Copy link
Contributor Author

@liutikas PTAL

@liutikas
Copy link
Collaborator

This is an ugly workaround. Instead we just need to wait for protobuf plugin to get fixed.

@liutikas liutikas closed this Jan 27, 2026
@Jaehwa-Noh
Copy link
Contributor Author

Jaehwa-Noh commented Jan 27, 2026

@liutikas Is there any reason datastore-protobuf to be Android library?

Does protobuf need android dependency?

@liutikas
Copy link
Collaborator

@liutikas Is there any reason datastore-protobuf to be Android library?

After another pass, you are right, this can just be JVM.

@liutikas liutikas reopened this Jan 27, 2026
@Jaehwa-Noh
Copy link
Contributor Author

@liutikas Thank you to review it again.

@liutikas liutikas merged commit eee94e4 into android:main Jan 27, 2026
10 checks passed
ohmgh added a commit to ohmgh/dqxn that referenced this pull request Feb 23, 2026
…oto JVM module

protobuf-gradle-plugin 0.9.6 casts to BaseExtension (removed in AGP 9),
breaking on Android modules. JVM modules don't touch Android APIs, so
moving proto generation to :data:proto sidesteps the issue entirely.

Same approach as Now in Android (android/nowinandroid#2054).

Validated: generateProto + compileKotlin succeeds on :data:proto.
All 7 toolchain compatibility checks now PASS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants