Wire build-rust.sh into Gradle preBuild#221
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 59 minutes and 37 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe pull request streamlines the Rust build integration for Android by automating it into the standard Gradle build lifecycle, updating task dependencies to ensure Rust compilation runs before Android pre-build steps, and simplifying build documentation to reflect the automated workflow. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@build.gradle.kts`:
- Line 7: The default KEEP_REPO path currently uses "${rootDir}/keep" which
conflicts with the documented clone flow; update the keepRepo initialization
(val keepRepo) to default to the repository parent directory (e.g., use
"${rootDir.parent}/keep" or an equivalent parent-based path expression instead
of "${rootDir}/keep"), and apply the same change to the other occurrences that
build the KEEP_REPO default later in the file so the documented "../keep" clone
workflow works without requiring users to set KEEP_REPO explicitly.
- Around line 17-20: The Gradle task input configuration only includes
keep-mobile/src and Cargo.toml so changes to Cargo.lock and build.rs won't
invalidate the task; update the inputs inside the existing if
(keepRepo.exists()) block (where inputs.dir("${keepRepo}/keep-mobile/src") and
inputs.file("${keepRepo}/keep-mobile/Cargo.toml") are set) to also register
inputs.file("${keepRepo}/keep-mobile/Cargo.lock") and
inputs.file("${keepRepo}/keep-mobile/build.rs") (using the same
withPathSensitivity(PathSensitivity.RELATIVE) pattern) so Rust dependency and
build-script changes correctly trigger task cache invalidation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ac8f9f86-f04f-4712-982e-0a9941d7b796
📒 Files selected for processing (3)
README.mdapp/build.gradle.ktsbuild.gradle.kts
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
buildRustGradle task now declares inputs (Rust sources, Cargo.toml, build-rust.sh, TARGETS) and outputs (jniLibs, generated bindings), so it is incremental.:app:preBuilddepends on:buildRust, so./gradlew assembleDebugrebuilds Rust only when sources change.CI is unchanged. The explicit build-rust.sh step still runs; the subsequent Gradle invocation finds outputs up-to-date and no-ops.
Test plan
Summary by CodeRabbit
Documentation
Chores