Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements support for validating the Rust toolchain version used in the local environment, based on a version constraint defined by the user in the Gradle configuration.
Projects can now declare which Rust version is considered compatible using the rustVersion property inside the rustJni extension block. Supported formats include:
Exact version: "1.86.0"
Minimum version: ">=1.64.0"
Wildcard versions: "1.86.", "1..*"
If the installed Rust version does not match the constraint, the build will fail with a clear and actionable error message.
This validation runs after the project is evaluated, ensuring that any value provided by the user is respected before checking.
📌 Solves: #28
🛠️ Implementation Note
Previously, the plugin accessed values from the rustJni extension immediately during apply(project), which caused it to read default values before the user-defined configuration in build.gradle.kts was applied.
This PR moves all logic that depends on user-defined values (such as version validation) into an afterEvaluate block. This ensures that the plugin uses the final, user-configured values from the build script, avoiding incorrect or premature validation.