Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0
-
None
-
None
Description
In Groovy 2.3, we introduced a new class named org.codehaus.groovy.runtime.typehandling.ShortTypeHandling. The problem is that for example in Gradle, if a plugin is compiled with Gradle 2, it will not work with earlier versions of Gradle, because it uses Groovy 2 internally.
At runtime, if you try a plugin compiled with Gradle 2 on Gradle 1.x, it will likely fail with:
* What went wrong: A problem occurred evaluating project ':groovylib'. > org/codehaus/groovy/runtime/typehandling/ShortTypeHandling
By adding the backport jar on classpath, this won't fail anymore. Note that there is no guarantee that it will work in all cases, but it gives more chances to newly compiled files to work with older versions of Groovy. The case of ShortTypeHandling is more critical than other changes because it is quite central.