You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by cc...@apache.org on 2016/07/08 15:37:46 UTC

groovy git commit: More build fixes to support Jigsaw

Repository: groovy
Updated Branches:
  refs/heads/master ffc248880 -> 380ae614a


More build fixes to support Jigsaw

This commit introduces 2 changes:

- if JDK 9 is used, then assume it's Jigsaw and patch `groovy-xml` compilation to use `-addmods`
- adjust the target level to 9 for `groovy-xml` in that case. This seems to be necessary and probably problematic for us.
- ugrade to ASM 6.0_ALPHA to support JDK 9 class format (but didn't do anything specific to use ASM 6 features)

This helps getting past `compileJava` for `groovy-xml`, but Groovy compilation itself fails with missing class exception.


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/380ae614
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/380ae614
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/380ae614

Branch: refs/heads/master
Commit: 380ae614ae4d979f00e6e362d210e2dd1295bdce
Parents: ffc2488
Author: Cedric Champeau <cc...@apache.org>
Authored: Fri Jul 8 17:33:35 2016 +0200
Committer: Cedric Champeau <cc...@apache.org>
Committed: Fri Jul 8 17:36:20 2016 +0200

----------------------------------------------------------------------
 build.gradle                        |  2 +-
 subprojects/groovy-xml/build.gradle | 11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/380ae614/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 678ca72..de6d90f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -139,7 +139,7 @@ configurations {
 
 ext {
     antVersion = '1.9.7'
-    asmVersion = '5.1'
+    asmVersion = '6.0_ALPHA'
     antlrVersion = '2.7.7'
     coberturaVersion = '1.9.4.1'
     commonsCliVersion = '1.3.1'

http://git-wip-us.apache.org/repos/asf/groovy/blob/380ae614/subprojects/groovy-xml/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/build.gradle b/subprojects/groovy-xml/build.gradle
index a3ba479..75f71f0 100644
--- a/subprojects/groovy-xml/build.gradle
+++ b/subprojects/groovy-xml/build.gradle
@@ -26,4 +26,13 @@ dependencies {
 task moduleDescriptor(type: org.codehaus.groovy.gradle.WriteExtensionDescriptorTask) {
     extensionClasses = 'org.codehaus.groovy.runtime.XmlGroovyMethods,groovy.xml.jaxb.JaxbGroovyMethods'
 }
-compileJava.dependsOn moduleDescriptor
+
+compileJava {
+    dependsOn moduleDescriptor
+    if (JavaVersion.current().java9Compatible) {
+        sourceCompatibility = 6
+        targetCompatibility = 9
+        options.fork = true
+        options.compilerArgs.addAll(['-addmods' , 'java.xml.bind'])
+    }
+}