1

My builds broke when I moved to Gradle 5 becasue Gradle v5.2 bundles with Groovy v2.5.4. These projects use the dynamic support build for Groovy.

This file is not being resolved for either JCenter or MavenCentral. However I did find a copy here:

I am not sure what can be done for Gradle to 'resolve' this file and actually find it.

  1. Can someone tell me were I should be getting this JAR file from?

    • I'm using coordinates: "org.codehaus.groovy:groovy-all:2.5.4:indy"
    • Is that still the correct expression?
  2. Is this a bug or am I just looking in the wrong places (see #1)?

    • Im ny build.gradle I was using jcenter() and tried changing that to mavenCentral().
    • Neither option came up with the JAR in question.

A final wrinkle is that we run an instance of Nexus. Is there some way to force Nexus to go outside and look-for this JAR?

will
  • 4,799
  • 8
  • 54
  • 90
  • From what version are you upgrading? – Rcordoval Feb 18 '19 at 23:57
  • 1
    Groovy 2.5 replaced groovy-all-2.x.y.jar with groovy-all-2.x.y.pom – emilles Feb 19 '19 at 01:19
  • This matter has come back to bit me again. Despite claims to the contrary and documentation on the Groovy language site, I can not find a `groovy-all-indy` package (POM or jar) on the public repositories. There seems to be NO `-indy` file all on codehaus for example: `http://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.5.4/`. Is the `-indy` option effectivly dead? As to why that version, looks as if Grade is exclusively Groovy 2.5.4, at least as far as v5.6. Time for a different question it seems. – will Sep 06 '19 at 05:01

1 Answers1

1

This is not entirely conclusive, but it seems that the -indy jar was there in groovy versions prior to 2.5.0 because those versions supported java versions prior to 1.7.

The indy jar was there so that you could optionally enable support for the invokedynamic instruction introduced in java 1.7 while still supporting java versions prior to 1.7 which did not include invokedynamic (groovy docs for indy).

It seems that groovy 2.5 bumped the minimum jdk requirement to, quote:

JDK requirements changes Groovy 2.5 requires JDK8+ to build and JDK7 is the minimum version of the JRE that we support.

(from http://groovy-lang.org/releasenotes/groovy-2.5.html)

which would make this whole duality of supporting both invokedynamic and without unnecessary.

So my guess would be that they just dumped the indy jar and always include the invokedynamic instruction in the normal groovy jar file set as the required jdk versions will always include it.

Matias Bjarland
  • 4,124
  • 1
  • 13
  • 21
  • Thanks for that I can follow that-up I suppose. That is the Sonatype repository that I came across, shown in my question. It has a **`groovy-2.5.4-indy`** with no `groovy-all` artefact. So it is definitely unclear. The invoke dynamic page still states that there are TWO version: "`groovy-x-y-z-indy.jar: compatible with JDK 1.7+, contains Groovy sources compiled with invokedynamic`". – will Feb 19 '19 at 22:26