Open
Conversation
Move all Project access out of @TaskAction methods into task properties
set at configuration time. This enables Gradle's configuration cache by
ensuring tasks don't reference the Project graph during execution.
- Make CargoBuildTask and GenerateToolchainsTask abstract with injected
ExecOperations and FileSystemOperations services
- Add @Input/@internal properties for all values previously read from
CargoExtension and Project at execution time
- Make Ndk, Toolchain, Features, and FeatureSpec implement Serializable
- Warn when cargo.exec closure is set (not compatible with config cache)
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.
Move all Project access out of
@TaskActionmethods into task properties set at configuration time. This enables Gradle's configuration cache by ensuring tasks don't reference the Project graph during execution. This should partially fix #114 (exception is whenexecis set).Changes include:
CargoBuildTaskandGenerateToolchainsTaskabstract with injectedExecOperationsandFileSystemOperationsservices@Input/@Internalproperties for all values previously read fromCargoExtensionandProjectat execution timeNDK,Toolchain,Features, andFeatureSpecimplementSerializablecargo.execclosure is setThis commit was co-authored by Claude Opus 4.6 (please let me know if this is a concern), but I've reviewed the changes myself, and done testing via local maven publishing with an existing project that supports a configuration cache.
--no-configuration-cacheflags, andexecblock.I'm happy to expand testing to additional cases I might have missed.