-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Build improvements #4553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/4.0
Are you sure you want to change the base?
Build improvements #4553
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves the build configuration to enable reproducible builds outside GitHub Actions by removing the deprecated JCenter repository, consolidating tool versions into a new version catalog, and adding automation for local Rust environment setup. The NDK is updated from r28c to the current stable r29.
Changes:
- Removed JCenter repository references from build configuration
- Created new
tools.versions.tomlversion catalog for tool versions (compileSdk, jvmTarget, ndk) - Added
setupRustAndroidLocal.gradletask to automate Rust toolchain setup for local development - Updated NDK from r28c (28.2.13676358) to r29 (29.0.14206865) across all workflow files
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle | Configures the new tools version catalog |
| gradle/tools.versions.toml | New version catalog defining compileSdk (34), jvmTarget (17), and NDK (29.0.14206865) versions |
| gradle/setupRustAndroidLocal.gradle | New Gradle task to automate Rust environment setup for local builds (with critical bugs in shell command execution) |
| gradle/libs.versions.toml | Removes compileSdk and ndk versions that were moved to tools.versions.toml |
| file_operations/setup_rust_android.sh | Updates shebang to use more portable #!/usr/bin/env bash |
| file_operations/build.gradle | Updates to reference tools version catalog and adds dependency on setupRustAndroidLocal task |
| app/build.gradle | Updates to reference tools version catalog and removes JCenter repository |
| portscanner/build.gradle | Updates to reference tools version catalog for compileSdk and jvmToolchain |
| commons_compress_7z/build.gradle | Updates to reference tools version catalog for compileSdk |
| build.gradle | Removes JCenter repository from allprojects repositories |
| .github/workflows/*.yml | Updates NDK version from r28c to r29 across all workflow files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Detect existence of rustup. | ||
| def rustupExists = exec { | ||
| commandLine("which", "rustup") | ||
| ignoreExitValue true | ||
| }.exitValue == 0 | ||
|
|
||
| if (!rustupExists) { | ||
| println("rustup not found. Installing rustup...") | ||
| exec { | ||
| commandLine( | ||
| "curl", | ||
| "--proto", "=https", | ||
| "--tlsv1.2", "-sSf", "https://sh.rustup.rs", | ||
| "|", | ||
| "sh", "-s", "--", "-y", "-v", "--default-toolchain", "none", "--no-modify-path") | ||
| } | ||
| } |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rustup detection logic is placed outside of both doFirst and doLast blocks. This means it will execute during the task configuration phase rather than the execution phase, which causes the check to run even when the task is not being executed (e.g., when running unrelated tasks). This also means rustup won't be available if it was just installed in the same task execution, as the check happens before the installation.
Move the rustup detection and conditional installation logic into the doFirst or doLast block so it executes during the task execution phase.
- Remove JCenter repo since it's no longer available - Created new version catalog for tool versions - Added setupRustAndroidLocal task for easier setup environment for compiling Rust module in file_operations - Update NDK to current stable version 29
cafe471 to
9d7f885
Compare
df6a654 to
2ad1d48
Compare
- Check rustup on common installation paths and user's $PATH or %PATH% - fail the build if rustup is not found - Use NDK LTS r27d
2ad1d48 to
9c4a201
Compare
|
It may not be looking for the NDK at the correct place, I have 3 NDK versions installed, including the last one. This is because |
Description
Changes per mentioned in #4551, hopefully can help create reproducible builds outside Github Actions.
stable version 29LTS version 27dIssue tracker
Addresses #4551
Build tasks success
Successfully running following tasks on local:
./gradlew assembledebug./gradlew spotlessCheck