groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anton.pryamostanov@gmail.com <anton.pryamosta...@gmail.com>
Subject Re: Potential questionable situation in Grapes Module Loading
Date Mon, 25 Mar 2019 08:07:06 GMT


On 2019/03/24 22:52:55, Paul King <paulk@asert.com.au> wrote: 
> If your pom for this dependency 'io.infinite:supplies:1.1.1' mentions a
> specific version of groovy, then
> I would expect the kinds of errors you are seeing if you are loading from a
> different version of Groovy.
> Either use the workarounds you mentioned on the gradle side - then you have
> an implicit assumption
> that the library will always be used from a groovy environment with the
> needed dependencies, or add
> a @GrabExclude of Groovy on the Groovy side alongside your '@Grab(
> 'io.infinite:supplies:1.1.1')'.
> 
> Cheers, Paul.
> 
> 
> On Mon, Mar 25, 2019 at 8:10 AM anton.pryamostanov@gmail.com <
> anton.pryamostanov@gmail.com> wrote:
> 
> > Oh, I forgot to say: relevant thread on Gradle forum:
> > https://discuss.gradle.org/t/gradle-groovy-library-scope-documentation-best-practices-grapes/31054
> >
> > It has some additional details (like workaround). Please kindly take a
> > look at that.
> >
> > Thank you.
> >
> > Bye (Anton)
> >
> 

Many thanks, Paul!

Shall I initiate to change the Gradle documentation? Since it's a common entry point for anyone
writing Groovy library using Gradle build.

My suggestion is to add there a block, saying - "For better compatibility with other build
tools, the recommended dependency scopes should be:"
..
dependencies {
    compileOnly 'org.codehaus.groovy:groovy-all:2.5.4' 
    testCompile 'org.codehaus.groovy:groovy-all:2.5.4' 
..
}
..

Mime
View raw message