Skip to content

Conversation

@rodroidmods
Copy link

- Replace cargo with cargo-ndk for better Android compatibility
- Add Windows support with automatic rustup installation
- Implement Gradle build cache support with proper task annotations
- Enable parallel ABI builds
- Add comprehensive build validation
- Improve error messages with actionable suggestions
- Auto-install cargo-ndk if missing
Critical Fixes:
- Fix cargo-ndk invocation: use 'cargo ndk' instead of direct 'cargo-ndk' binary
- Add ANDROID_NDK_HOME environment variable for cargo-ndk compatibility
- Auto-detect Rust installation path (~/.cargo/bin, CARGO_HOME)
- Improve error handling for missing Rust toolchain
- Add graceful version detection fallback

These fixes resolve:
- 'This binary may only be called via cargo ndk' error
- Requirement to manually set cargo.bin in local.properties
- Build failures when Rust is not in system PATH
@MatrixDev
Copy link
Owner

@rodroidmods, thanks for your contribution. this PR has quite a few changes though, I will try to find time to review it in the near future.

- Add new CargoCleanTask that runs cargo clean for Rust modules
- Add cargoClean configuration option at extension, module, and build type levels
- Register cargoClean task to clean all modules
- Register cargoClean<ModuleName> tasks for individual modules
- Auto-hook cargoClean to Gradle clean task when cargoClean = true is set
- Update README.md with new feature documentation
- Update AGP to 8.13.0
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