-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Settings scripts and plugins should provide APIs to create RegularFile and Directory instances according to the settings layout #16506
Comments
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
I think this issue is still relevant. |
We need such an API to properly declare inputs to configuration cache from settings plugin. |
…gs script ~~Spike~~ Implementation for https://docs.google.com/document/d/1v1JopC-d0RsojFbN7NP3qw1d2MdszTQw79qAGjkHVAA/view Issue: #16506 Co-authored-by: Rafael Chaves <rchaves@gradle.com>
@jdochez @cesar1000 Last night's nightly has new API under https://docs.gradle.org/nightly/javadoc/org/gradle/api/initialization/Settings.html#getLayout-- (also injectable as a service) PTAL and let us know if it covers your use cases. |
- also tweak javadoc for SettingsLayout Issue: #16506
This is now implemented (to be released in 8.5). |
The API is still WIP. Reopening. |
...to open room for a new BuildLayout API type Issue: #16506
...to open room for a new BuildLayout API type Issue: #16506
...to open room for a new BuildLayout API type Issue: #16506
- remove FileSystemLayout Issue: #16506
...to open room for a new BuildLayout API type Context (by @adammurdoch): > Regarding #26227, I think we should rename SettingsLayout to BuildLayout. Settings isn’t really a thing that has a layout, it’s basically just a mutable view of the build. To me it doesn’t make sense to talk about a “settings layout”. It’s the build that has the layout. Issue: #16506 ### Reviewing cheatsheet Before merging the PR, comments starting with - ❌ ❓**must** be fixed - 🤔 💅 **should** be fixed - 💭 **may** be fixed - 🎉 celebrate happy things Co-authored-by: Rafael Chaves <rchaves@gradle.com>
Rename SettingsLayout to BuildLayout - also remove FileSystemLayout Issue: #16506 ### Reviewing cheatsheet Before merging the PR, comments starting with - ❌ ❓**must** be fixed - 🤔 💅 **should** be fixed - 💭 **may** be fixed - 🎉 celebrate happy things Co-authored-by: Rafael Chaves <rchaves@gradle.com>
Rename SettingsLayout to BuildLayout - also remove FileSystemLayout Issue: #16506 ### Reviewing cheatsheet Before merging the PR, comments starting with - ❌ ❓**must** be fixed - 🤔 💅 **should** be fixed - 💭 **may** be fixed - 🎉 celebrate happy things Co-authored-by: Rafael Chaves <rchaves@gradle.com>
Issue: #16506 Co-authored-by: Rafael Chaves <rchaves@gradle.com>
…le services Issue: #16506 Co-authored-by: Rafael Chaves <rchaves@gradle.com>
Settings scripts and plugins can currently only access
Settings.rootDir
orSettings.settingsDir
which returnFile
instances. Several Gradle APIs requireRegularFile
orDirectory
instances and creating them from aFile
is currently not convenient.This issue is about providing convenient APIs to Settings scripts and plugins to work with APIs that require
RegularFile
orDirectory
instances.On example of such API is
providers.fileContents(file)
that expects aRegularFile
.This could be done in the same way it is currently done for Project scripts and plugins that have the
ProjectLayout
available.Current Behavior
To use
providers.fileContents(file)
the convoluted following is currently required:Note that it requires using the internal service lookup.
Expected Behavior
It should be convenient and only require public API instead, e.g.:
The text was updated successfully, but these errors were encountered: