Skip to content

spotless loads dependency from project dependencies #99

Closed

Description

@cal101

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.

Activity

  1. nedtwigg commented on Apr 10, 2017

    @nedtwigg
    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.

  2. cal101 commented on Apr 10, 2017

    @cal101
    ContributorAuthor

    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?

  3. nedtwigg commented on Apr 10, 2017

    @nedtwigg
    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.

  4. cal101 commented on Apr 10, 2017

    @cal101
    ContributorAuthor

    I take a look at it tomorrow.

  5. cal101 commented on Apr 11, 2017

    @cal101
    ContributorAuthor

    Anything missing?

  6. cal101 commented on Apr 11, 2017

    @cal101
    ContributorAuthor

    Fixed with merge.

  7. nedtwigg commented on Apr 11, 2017

    @nedtwigg
    Member

    Published in 3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions