Skip to content

Conversation

@shubham1g5
Copy link
Contributor

@shubham1g5 shubham1g5 commented Jul 14, 2025

Product Description

Updates Gradle and Android Nav component
Corresponds to the changes here - #3243

QA Plan

Labels and Review

  • Do we need to enhance the manual QA test coverage ? If yes, the "QA Note" label is set correctly
  • Does the PR introduce any major changes worth communicating ? If yes, the "Release Note" label is set and a "Release Note" is specified in PR description.
  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@coderabbitai
Copy link

coderabbitai bot commented Jul 14, 2025

📝 Walkthrough

Walkthrough

The changes update the project's build configuration and Gradle wrapper to use newer versions. The navigation component dependency is upgraded from version 2.8.5 to 2.9.1, and the Android Gradle plugin is updated from 8.1.1 to 8.6.1 in the build script. The Gradle wrapper properties are also modified to use Gradle version 8.7 instead of 8.1.1. No changes were made to public or exported entities, and the structure of the configuration files remains largely the same apart from version increments and minor reordering.

Suggested labels

skip-integration-tests

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gradleUpdateMaster

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between efd0cdc and 57cc1a7.

📒 Files selected for processing (2)
  • build.gradle (1 hunks)
  • gradle/wrapper/gradle-wrapper.properties (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.530Z
Learning: PR #3048 "Phase 4 Connect PR" introduces a substantial feature called "Connect" to the CommCare Android app, which includes messaging, job management, delivery tracking, payment processing, authentication flows, and learning modules. It follows a modern architecture using Navigation Components with three navigation graphs, segregated business logic in Manager classes, and proper database persistence.
Learnt from: pm-dimagi
PR: dimagi/commcare-android#2847
File: app/build.gradle:294-295
Timestamp: 2025-01-27T15:18:25.903Z
Learning: The Connect base URL and API version in build.gradle are intentionally hardcoded as these values do not change with variants.
build.gradle (1)
Learnt from: pm-dimagi
PR: dimagi/commcare-android#2847
File: app/build.gradle:294-295
Timestamp: 2025-01-27T15:18:25.903Z
Learning: The Connect base URL and API version in build.gradle are intentionally hardcoded as these values do not change with variants.
🔇 Additional comments (3)
gradle/wrapper/gradle-wrapper.properties (1)

4-6: Double-check CI JDK level

Gradle 8.7 requires at least JDK 17. Make sure all CI jobs and local dev containers have been bumped; otherwise builds will fail right after this PR lands.

build.gradle (2)

3-3: nav_version = 2.9.1 may still be pre-release

At the time of writing, 2.9.x of Navigation is tagged alpha. If the project targets only stable artifacts, pinning to 2.8.5/2.8.6 would be safer.
Please confirm that:

  1. All downstream modules compile against the new APIs.
  2. Play-store policy allows shipping with alpha libraries (some orgs forbid it).

If stability is required, consider reverting to the latest stable tag.


10-10: AGP 8.6.1 → verify tool-chain compatibility

8.6.x is a canary/alpha AGP line that introduces several breaking DSL/API changes and bumps the minimum Kotlin to 2.0.*. Your root script still pins Kotlin 1.8.20, which will not compile with AGP 8.6.

Actions:

-ext.kotlin_version = '1.8.20'
+ext.kotlin_version = '2.0.0'   // or the lowest version accepted by AGP 8.6

Also ensure every module’s plugins { id "com.android.application" VERSION } (or library) has its version removed so it inherits the classpath’s 8.6.1.

Failing to align Kotlin/AGP will break the build immediately.

Comment on lines +1 to +4
#Mon Jul 14 21:36:29 ICT 2025
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Wrapper JAR must accompany the version bump

gradle-wrapper.properties now points to Gradle 8.7, but the PR doesn’t show the regenerated gradle/wrapper/gradle-wrapper.jar (and updated shell/bat scripts). Mixing an old wrapper JAR with a newer distribution URL can break builds on developer & CI machines.

Run:

and push the updated binary.


🏁 Script executed:

./gradlew wrapper --gradle-version 8.7 --distribution-type bin
git add gradle/wrapper/gradle-wrapper.jar gradle/wrapper/gradle-wrapper.properties

Length of output: 339


Regenerate Gradle Wrapper JAR
Your gradle-wrapper.properties now points to Gradle 8.7, but the wrapper JAR wasn’t updated due to an invalid JAVA_HOME. Please:

  1. Set JAVA_HOME to a valid JDK installation (e.g.):
    export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
    
  2. Run:
    ./gradlew wrapper --gradle-version 8.7 --distribution-type bin
    git add gradle/wrapper/gradle-wrapper.jar gradle/wrapper/gradle-wrapper.properties
    
  3. Commit and push the updated files.

Files to verify:

  • gradle/wrapper/gradle-wrapper.jar
  • gradle/wrapper/gradle-wrapper.properties

This will ensure your local and CI builds use the correct wrapper version.

🤖 Prompt for AI Agents
In gradle/wrapper/gradle-wrapper.properties lines 1 to 4, the Gradle version was
updated to 8.7 but the gradle-wrapper.jar was not regenerated due to an invalid
JAVA_HOME. Fix this by setting JAVA_HOME to a valid JDK path, then run the
command to regenerate the wrapper with Gradle 8.7 and the binary distribution
type. After that, add both gradle-wrapper.jar and gradle-wrapper.properties to
git, then commit and push the changes to ensure consistency in local and CI
builds.

@shubham1g5
Copy link
Contributor Author

@damagatchi retest this please

1 similar comment
@shubham1g5
Copy link
Contributor Author

@damagatchi retest this please

@shubham1g5 shubham1g5 force-pushed the gradleUpdateMaster branch from 57cc1a7 to dd8b660 Compare July 16, 2025 11:57
@shubham1g5 shubham1g5 marked this pull request as ready for review July 16, 2025 11:57
@shubham1g5
Copy link
Contributor Author

@damagatchi retest this please

1 similar comment
@shubham1g5
Copy link
Contributor Author

@damagatchi retest this please

@shubham1g5
Copy link
Contributor Author

Build is passing now, requesting a review.

@Jignesh-dimagi
Copy link
Contributor

@shubham1g5 Build was failing before due to jenkin's issue? I mean their gradle was not updated or something similar error?

@shubham1g5
Copy link
Contributor Author

@Jignesh-dimagi It was an outdated Jenkins plugin that was causing an error before for Jacoco that we have removed to fixed this.

@shubham1g5 shubham1g5 merged commit 2e136be into master Jul 25, 2025
6 checks passed
@shubham1g5 shubham1g5 deleted the gradleUpdateMaster branch July 25, 2025 11:45
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.

4 participants