Re: Build problem using groovy 4.0.1

Paul King <[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CAMbkE7TRm23Mzycgaffq1S5Txn8ao=XGwyv_RLjT1XTjdFuzYQ@mail.gmail.com>
Can you try:

implementation platform('org.apache.groovy:groovy-all:4.0.1')



<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, Mar 16, 2022 at 1:16 PM Nelson, Erick <Erick.Nelson-NXabUB82sh5Wk0Htik3J/[email protected]>
wrote:

> *I’m trying to build a groovy project with Gradle…*
>
>
>
> $ gradle -v
>
>
>
> ------------------------------------------------------------
>
> Gradle 7.4.1
>
> ------------------------------------------------------------
>
>
>
> Build time:   2022-03-09 15:04:47 UTC
>
> Revision:     36dc52588e09b4b72f2010bc07599e0ee0434e2e
>
>
>
> Kotlin:       1.5.31
>
> Groovy:       3.0.9
>
> Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
>
> JVM:          1.8.0_322 (Red Hat, Inc. 25.322-b06)
>
> OS:           Linux 4.18.0-348.12.2.el8_5.x86_64 amd64
>
>
>
>
>
>
>
> *But I get the follow error with trying to build with 4.0.1.*
>
> *Any hints on what I am missing ? I had no problem building with 3.0.9.*
>
>
>
>
>
> > Task :compileGroovy FAILED
>
>
>
> FAILURE: Build failed with an exception.
>
>
>
> * What went wrong:
>
> Execution failed for task ':compileGroovy'.
>
> > Could not resolve all files for configuration ':compileClasspath'.
>
>    > Could not resolve org.apache.groovy:groovy-all:4.0.1.
>
>      Required by:
>
>          project :
>
>       > *No matching variant of org.apache.groovy:groovy-all:4.0.1 was
> found.* The consumer was configured to find an API of a library
> compatible with Java 8, preferably not packaged as a jar, preferably
> optimized for standard JVMs, and its dependencies declared externally but:
>
>           - *Variant* 'apiElements' capability
> org.apache.groovy:groovy-all:4.0.1 declares an API of a component:
>
>               - Incompatible because this component declares a platform
> and the consumer needed a library
>
>               - Other compatible attributes:
>
>                   - Doesn't say anything about how its dependencies are
> found (required its dependencies declared externally)
>
>                   - Doesn't say anything about its target Java environment
> (preferred optimized for standard JVMs)
>
>                   - Doesn't say anything about its target Java version
> (required compatibility with Java 8)
>
>                   - Doesn't say anything about its elements (required them
> preferably not packaged as a jar)
>
>
>
> With quite a few more “*Variant*” issues after this…
>
>
>
>
>
>
>
> Erick Nelson
> Senior Developer
> HD Supply, Inc.
> T: 858.740.6523
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.