Skip to content
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

abstract operations for reading/setting system properties and reading files #48

Closed
voidzcy opened this issue Jan 19, 2021 · 1 comment
Closed
Milestone

Comments

@voidzcy
Copy link
Contributor

voidzcy commented Jan 19, 2021

Context:

The osdetector-gradle-plugin is a thin wrapper built on top of this plugin for Gradle users. It has been a handy tool built into many other Gradle plugins, such as the protobuf-gradle-plugin, which needs OS information to determine and resolve a platform-dependent artifact (protoc).

Gradle is rolling out its configuration caching feature, which persists build configurations to the disk and can be loaded and executed instantly next time if the build configuration has not change. In order to be compliant with this feature, plugins are not allowed to perform direct system property/file read at the configuration phase (see Gradle configuration cache requirements). Instead, Gradle provides several Provider APIs for doing such at the configuration phase in a configuration cache compliant way.

Request of changes:

We want this plugin to abstract and expose an interface for system property/file operations, so that it allows wrapper plugins to override/inject code for performing system property/file operations in their own way.

Would you accept a PR for such changes? I've create one in #47, please let me know or comment on the PR if you have any concerns.

@trustin trustin added this to the 1.7.0 milestone Jan 20, 2021
trustin pushed a commit that referenced this issue Feb 6, 2021
Creates interfaces for abstracting away system property and file 
operations. Wrapper plugins can inject their own code for
performing those operations in ways compliant to the 
environment/tool.

See details in #48.
@trustin
Copy link
Owner

trustin commented Feb 6, 2021

Fixed via #47

@trustin trustin closed this as completed Feb 6, 2021
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

No branches or pull requests

2 participants