Project (re)load API, initial implementation #7651
Merged
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.
The motivation for this (still experimental) API is that often the user of maven/gradle/whatever project system can use abstract APIs, like classpath, now project dependencies, or subproject / container queries, but in order to work well, the project must be loaded to a "certain quality".
Also some operations, like modifications are better done on 'fresh' model. Each supported project has its own way how to report it reloads (e.g. through a PropertyChangeListener), and SOME of them have a way how to initate a reload and hook after the reload completes (gradle). Some not (maven). After some thinking I've created an abstraction mainly based on Gradle's better project description ... hybridized ;) with Maven's priming and re-loading.
And here it goes. This PR contains just an API. There will be additional PR(s) with Maven and Gradle implementation of this API that adapts Maven/Gradle internal features to this abstraction.
This a review draft, but I do not expect much changes as Maven implementation is already done (will be the next PR), I need to retrofit Gradle implementation.