Skip to content

fix: Allow dependency to be use with Gradle 9#48

Open
validcube wants to merge 1 commit intobdlukaa:masterfrom
validcube:fix/remove-jcenter
Open

fix: Allow dependency to be use with Gradle 9#48
validcube wants to merge 1 commit intobdlukaa:masterfrom
validcube:fix/remove-jcenter

Conversation

@validcube
Copy link
Contributor

This will allow the dependency to be use with Gradle 9

Gradle 9 removed option to use JCenter repository, a better option is to migrate to MavenCentral which

Tested with Gradle 9.3.1 by compiling and running a Android project with this changes on Pixel 7 Android 17 Beta 2

@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 addresses compatibility with Gradle 9 by updating the build.gradle file. The primary change involves migrating from the deprecated JCenter repository to MavenCentral for dependency resolution. This ensures that projects can successfully compile and run using the latest Gradle versions, preventing build failures related to unavailable repositories.

Highlights

  • Gradle 9 Compatibility: Updated the build.gradle file to replace the deprecated JCenter repository with MavenCentral, ensuring that the dependency can be used with Gradle 9, which no longer supports JCenter.
Changelog
  • system_theme/android/build.gradle
    • Replaced jcenter() with mavenCentral() in the buildscript repositories block.
    • Replaced jcenter() with mavenCentral() in the rootProject.allprojects repositories block.
Activity
  • No human activity has been recorded on this pull request yet.
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 aims to add support for Gradle 9 by replacing the deprecated jcenter() repository with mavenCentral(). While this change is correct and necessary, it is insufficient on its own. The project's Android Gradle Plugin version is outdated and incompatible with Gradle 9, which will cause build failures. I've left a comment with details on the required additional changes to achieve full Gradle 9 compatibility.

repositories {
google()
jcenter()
mavenCentral()

Choose a reason for hiding this comment

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

critical

While replacing jcenter() with mavenCentral() is a necessary step for Gradle 9 compatibility, this change alone is not sufficient. To achieve the goal of this PR, several other dependencies need to be updated:

  1. Android Gradle Plugin (AGP): The current version 4.1.0 (line 12) is not compatible with Gradle 9. You should update it to a more recent version, for example 8.3.2, which is compatible with Gradle 8.4+.
  2. Kotlin Version: The AGP update will require a corresponding update to the Kotlin version (1.7.0 on line 5). For AGP 8.3.2, the compatible Kotlin version is 1.9.22.
  3. Gradle Wrapper: The project's Gradle wrapper is configured for Gradle 6.7 (gradle-wrapper.properties). This must be updated to a version compatible with the new AGP, such as Gradle 8.4.

Without these changes, the project will not be buildable with Gradle 9, defeating the purpose of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, this PR only make it so that you can build Android app with Gradle 9 using this library.

The library is working as intended on project built with Gradle 9

Screenshot_20260304-115700.png

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