We had numerous users who were confused with the change, so have made some
further refinements. From Groovy 4.0.2, you won't need the "platform" (so
back to the way it was before).
See the release notes for more details.

Cheers, Paul.

On Sat, Mar 19, 2022 at 10:21 PM Kerridge, Jon <j.kerri...@napier.ac.uk>
wrote:

> Paul,
> Thank you for the suggestion!
> It worked in Intellij and Gradle 7.4 with groovy-all 4.0.1.
>
> All the library components were downloaded and copied to the Gradle
> location with all other libraries.
> see the following taken from the Project Settings > Libraries area in
> Intellij Project Structure window
>
>
>    - Gradle: org.apache.groovy:groovy-ant:4.0.1
>    - Gradle: org.apache.groovy:groovy-cli-picocli:4.0.1
>    - Gradle: org.apache.groovy:groovy-console:4.0.1
>    - Gradle: org.apache.groovy:groovy-datetime:4.0.1
>    - Gradle: org.apache.groovy:groovy-docgenerator:4.0.1
>    - Gradle: org.apache.groovy:groovy-groovydoc:4.0.1
>    - Gradle: org.apache.groovy:groovy-groovysh:4.0.1
>    - Gradle: org.apache.groovy:groovy-jmx:4.0.1
>    - Gradle: org.apache.groovy:groovy-json:4.0.1
>    - Gradle: org.apache.groovy:groovy-jsr223:4.0.1
>    - Gradle: org.apache.groovy:groovy-macro:4.0.1
>    - Gradle: org.apache.groovy:groovy-nio:4.0.1
>    - Gradle: org.apache.groovy:groovy-servlet:4.0.1
>    - Gradle: org.apache.groovy:groovy-sql:4.0.1
>    - Gradle: org.apache.groovy:groovy-swing:4.0.1
>    - Gradle: org.apache.groovy:groovy-templates:4.0.1
>    - Gradle: org.apache.groovy:groovy-test-junit5:4.0.1
>    - Gradle: org.apache.groovy:groovy-test:4.0.1
>    - Gradle: org.apache.groovy:groovy-xml:4.0.1
>    - Gradle: org.apache.groovy:groovy-yaml:4.0.1
>    - Gradle: org.apache.groovy:groovy:4.0.1
>
>
> Jon
>
>
>
>
> Emeritus Professor Jon Kerridge BSc MSc PhD FBCS FHEA CITP CEng
> School of Computing
> Edinburgh Napier University
> Merchiston Campus
> Edinburgh EH10 5DT
>
> j.kerri...@napier.ac.uk
>
>
> ------------------------------
> *From:* Paul King <pa...@asert.com.au>
> *Sent:* 18 March 2022 23:02
> *To:* users@groovy.apache.org <users@groovy.apache.org>
> *Subject:* Re: Build problem using groovy 4.0.1
>
> ​
>
> *CAUTION: This email originated from outside Edinburgh Napier University.
> Do not follow links or open attachments if you doubt the authenticity of
> the sender or the content.*
> 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>
> <#m_5423878299965237075_x_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> On Wed, Mar 16, 2022 at 1:16 PM Nelson, Erick <erick.nel...@hdsupply.com>
> 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
>
>
>
> This message and its attachment(s) are intended for the addressee(s) only
> and should not be read, copied, disclosed, forwarded or relied upon by any
> person other than the intended addressee(s) without the permission of the
> sender. If you are not the intended addressee you must not take any action
> based on this message and its attachment(s) nor must you copy or show them
> to anyone. Please respond to the sender and ensure that this message and
> its attachment(s) are deleted.
>
> It is your responsibility to ensure that this message and its
> attachment(s) are scanned for viruses or other defects. Edinburgh Napier
> University does not accept liability for any loss or damage which may
> result from this message or its attachment(s), or for errors or omissions
> arising after it was sent. Email is not a secure medium. Emails entering
> Edinburgh Napier University's system are subject to routine monitoring and
> filtering by Edinburgh Napier University.
>
> Edinburgh Napier University is a registered Scottish charity. Registration
> number SC018373
>
> BSL users can contact us via contactSCOTLAND-BSL, the on-line British Sign
> Language interpreting service. Find out more on the contactSCOTLAND website.
>

Reply via email to