-
Notifications
You must be signed in to change notification settings - Fork 464
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
Add support for predeclared dependencies. #1039
Conversation
…can optionally be hooked into for triggering dependency resolution.
What about repositories being set in |
That's a good question. I think they get hit by spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GradleProvisioner.java Lines 105 to 109 in 8ae601c
If they don't get hit, I'm not sure how to hit them, but I'm open to a PR to add another mode or have them get included in the |
Published in |
Starting in 6.0, dependencies are now resolved from project repositories rather than buildscript repositories. That fixed some things, but broke other things. In this PR, we add the ability to fix everything by predeclaring your formatters in the root project.
Alternatively, you can also use
predeclareDepsFromBuildscript()
to resolve the dependencies from the buildscript repositories rather than the project repositories.If you use this feature, you will get an error if you use a formatter in a subproject which is not declared in the
spotlessPredeclare
block.Fixes #1026, #1027, #1028, #1032, #1034, and #1042, by implementing #984