Conversation
|
Wonderful! Looks like it needs a |
3db843d to
611af68
Compare
611af68 to
f7829b5
Compare
41e3f19 to
bebb746
Compare
|
Fixed. Sorry I rebased and force pushed the changes, it's an habit of mine... I added the changelog entry, but I'm not sure where I should update the documentation. |
https://github.com/diffplug/spotless/tree/main/plugin-gradle#dependency-resolution-modes This should have a note of some kind saying "breaks isolated projects" or something like that. Assuming CI passes and no other contributors have any objections, I'll merge and release next week. |
|
I added a note where you suggested, let me know if it's good enough. Regarding CI, it seems like there are different isolated project error outputs, while I get the following locally: CI sees this: And that breaks the test I created. I don't understand the difference, since I'm running the gradle wrapper too and should run the same gradle version. I'll investigate... |
|
Okay, it seems like CI was executing that test on Gradle 9, and the message is different on that version, I've changed the test to Edit: I just saw that |
This PR adds partial support for isolated projects.
They're supported as long as
predeclareDeps()is not called in the root extension.The PR does the following:
.getRootProject.file(...)since it's not supported by isolated projects.GradleCompatfile becauseproject.findPropertyandproject.hasPropertycan't be used and the compat file is not meaningful anymore.SpotlessTaskServicereference fromRegisterDependenciesTasktoSpotlessExtensionas the task is not really owning the task service. This simplifies some dependencies needing to get the task reference first.SpotlessExtensionnot reference theRegisterDependenciesTaskwhich is created in the root project and moves all of that toSpotlessExtensionPredeclare. Since this task is only needed (AFAIK) for predeclared, it makes sense that the task is only referenced there.RegisterDependenciesTaskis not executed when predeclared is not used.