Git Product home page Git Product logo

Comments (11)

mlem avatar mlem commented on April 29, 2024

+1

from gradle-plugins.

costin avatar costin commented on April 29, 2024

Encountering the same problem myself. I'm currently stuck with version 0.0.5 and Gradle 1.12

from gradle-plugins.

philwebb avatar philwebb commented on April 29, 2024

It looks like b03d091 might have flipped the extendsFrom for some reason. provided and optional used to extend from compile and now it appears to be the other way around.

@bclozel Was this intentional as part of the IDEA 13 fix?

from gradle-plugins.

bclozel avatar bclozel commented on April 29, 2024

@philwebb Yes, that was part of the fix. Our previous implementation of that scope was somewhat flawed and didn't work all the time (in some cases, those provided dependencies were transitive and exported with the artifact... that's not what you want!).

When looking at this figure and knowing that we want provided dependencies to:

  • be available when compiling sources and tests
  • not to be there at runtime nor when used as a dependency (the default scope)

That's why the compile scope extends this one, and we remove those dependencies from the default one. To be consistent, we should remove them from the runtime scope.

configuration.allDependencies.all {
  dep -> configurations.runtime.exclude(group: dep.group, module: dep.name)
}

I later found a blog post that describes all this.

Like IDEs and Gradle (if I get it right...), you should probably build your JAR using the default scope and things should work as expected.

from gradle-plugins.

philwebb avatar philwebb commented on April 29, 2024

I've started to move the repo to https://github.com/spring-gradle-plugins/propdeps-plugin. Would reverting the main change (see https://github.com/philwebb/propdeps-plugin/tree/gh-1) break IDEA again?

from gradle-plugins.

bclozel avatar bclozel commented on April 29, 2024

@philwebb Yes, and other use cases as well - provided dependencies were transitive in the spring-framework build prior that change.

@costin @mlem Are you building a custom JAR with the compile scope as well?

@fs111 could you try the same thing using configurations.default and see if the JAR get properly created?

from gradle-plugins.

fs111 avatar fs111 commented on April 29, 2024

I tried the configurations.default thing in a build, which also uses the fatJar plugin, and that does not work. It works with 0.0.5 though.

from gradle-plugins.

k-mack avatar k-mack commented on April 29, 2024

I've been watching this thread.

@fs111 , I, too, am using Gradle for Hadoop projects. Using configurations.default works for me with Gradle 2.0 and propdeps-plugin-0.0.7

from gradle-plugins.

philwebb avatar philwebb commented on April 29, 2024

@fs111 Do you have a complete example project that we could take a look at? Perhaps you could share something on GitHub?

from gradle-plugins.

fs111 avatar fs111 commented on April 29, 2024

@k-mack can you share an example? I cannot, for the life of me, get that to work.

from gradle-plugins.

wilkinsona avatar wilkinsona commented on April 29, 2024

The propdeps plugin has moved to the Spring Attic and is no longer maintained.

from gradle-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.