Gradle not working on Jigsaw
Cédric Champeau
cedric.champeau at gmail.com
Thu Oct 20 18:31:28 UTC 2016
2 things:
- Groovy uses ASM, but it's relocated, and used internally by Groovy.
Groovy will fail if it tries to parse a Java 9 class file, that's for sure.
- Gradle also uses ASM, a different version, that also has the version
parsing problem, but at every place we use ClassReader, we use a wrapper
[1] to workaround this.
There's no relation between the 2: Groovy uses ASM for its own business,
and Gradle too.
[1]
https://github.com/gradle/gradle/blob/d3cb6e9d7e87eb3d98ee23c7c61b644e227f82f3/subprojects/core/src/main/java/org/gradle/util/internal/Java9ClassReader.java#L25-L25
2016-10-20 19:50 GMT+02:00 Stephen Felts <stephen.felts at oracle.com>:
> I’m not sure that I understand. I did a jar xf on the class and ran jad
> on it. Are you saying it’s somehow by-passing this class?
>
>
>
> *From:* Cédric Champeau [mailto:cedric.champeau at gmail.com]
> *Sent:* Thursday, October 20, 2016 1:33 PM
> *To:* Stephen Felts
> *Cc:* jigsaw-dev
> *Subject:* Re: Gradle not working on Jigsaw
>
>
>
> Gradle uses a custom ClassReader on top of the one provided by ASM to fix
> this version issue.
>
>
>
> 2016-10-20 18:38 GMT+02:00 Stephen Felts <stephen.felts at oracle.com>:
>
> I also note that Gradle 3.0 still has both
>
> lib/asm-all-5.1.jar!org/objectweb/asm/ClassReader.class
>
> and
>
> lib/groovy-all-2.4.7.jar!groovyjarjarasm/asm/ClassReader.class
>
> that fail if the version is > 52.
>
> This isn't related to the failure below but they should be fixed.
>
>
>
> -----Original Message-----
> From: Stephen Felts
> Sent: Wednesday, October 19, 2016 10:43 PM
> To: jigsaw-dev at openjdk.java.net
> Subject: Gradle not working on Jigsaw
>
> I have the line
>
> def branch = file('..').name
>
> in build.gradle.
>
> Running 'gradle' on build 140
>
> Jdk-9 - runs fine
>
> JDK-9 Jigsaw gets
> * What went wrong:
> A problem occurred evaluating root project 'dir'.
> > No such property: name for class: java.io.File
>
> To run on Jigsaw, I also need to set _JAVA_OPTIONS to include
> --add-exports-private=java.base/java.lang=ALL-UNNAMED
> --add-exports-private=java.base/java.util=ALL-UNNAMED
>
>
>
More information about the jigsaw-dev
mailing list