Skip to content
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

spotless loads dependency from project dependencies #99

Closed
cal101 opened this issue Apr 10, 2017 · 7 comments
Closed

spotless loads dependency from project dependencies #99

cal101 opened this issue Apr 10, 2017 · 7 comments
Labels

Comments

@cal101
Copy link
Contributor

cal101 commented Apr 10, 2017

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.

@nedtwigg nedtwigg added the bug label Apr 10, 2017
@nedtwigg
Copy link
Member

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
Copy link
Contributor Author

cal101 commented 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
Copy link
Member

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.

@cal101
Copy link
Contributor Author

cal101 commented Apr 10, 2017

I take a look at it tomorrow.

@cal101
Copy link
Contributor Author

cal101 commented Apr 11, 2017

Anything missing?

@cal101
Copy link
Contributor Author

cal101 commented Apr 11, 2017

Fixed with merge.

@cal101 cal101 closed this as completed Apr 11, 2017
@nedtwigg
Copy link
Member

Published in 3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants