You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spotless loads dependency from project dependencies #99
The following dependency spotless-ext-eclipse-jdt-4.6.1.jar is loaded from the projects repositories
instead of the buildscript repositories when using the java formatter.
Is that expected behavior?
I expected not having to change the project repositories.
Sure that this is the place? I can't check better at the moment but this looks like your place is adding the project dependencies to whatever.
My problem seems more related to some place requesting the extra dependency from the wrong repositories list. Or do you consider your place one side and the requesting place the other side that both needs to be fixed?
Yep, that's definitely the place. In your spotless config block, you're building up a set of steps that you need to format your code. Those steps then tell Spotless "I need these maven coordinates to do my job", through the Provisioner API, which is implemented by GradleProvisioner. The only place that needs to be changed is definitely GradleProvisioner, but I'm not sure how it should be changed.
Activity
nedtwigg commentedon Apr 10, 2017
I think that is the expected behavior, but I agree that it is probably a bug. This is the code in question:
https://github.com/diffplug/spotless/blob/master/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GradleProvisioner.java
Happy to merge a PR from anyone which addresses this issue.
cal101 commentedon Apr 10, 2017
Sure that this is the place? I can't check better at the moment but this looks like your place is adding the project dependencies to whatever.
My problem seems more related to some place requesting the extra dependency from the wrong repositories list. Or do you consider your place one side and the requesting place the other side that both needs to be fixed?
nedtwigg commentedon Apr 10, 2017
Yep, that's definitely the place. In your spotless config block, you're building up a set of steps that you need to format your code. Those steps then tell Spotless "I need these maven coordinates to do my job", through the
ProvisionerAPI, which is implemented byGradleProvisioner. The only place that needs to be changed is definitely GradleProvisioner, but I'm not sure how it should be changed.cal101 commentedon Apr 10, 2017
I take a look at it tomorrow.
cal101 commentedon Apr 11, 2017
Anything missing?
cal101 commentedon Apr 11, 2017
Fixed with merge.
nedtwigg commentedon Apr 11, 2017
Published in 3.3.0
Extension requiring external libraries on demand use the buildscript …