You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2018/07/08 07:13:02 UTC
groovy git commit: jdk11 build fixes
Repository: groovy
Updated Branches:
refs/heads/master 48d3b1ad5 -> 90a852b1e
jdk11 build fixes
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/90a852b1
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/90a852b1
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/90a852b1
Branch: refs/heads/master
Commit: 90a852b1eb1cfe31e43ec594b715bb23f0402b2b
Parents: 48d3b1a
Author: Paul King <pa...@asert.com.au>
Authored: Sun Jul 8 17:12:54 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Sun Jul 8 17:12:54 2018 +1000
----------------------------------------------------------------------
build.gradle | 5 ----
gradle/jdk9.gradle | 28 --------------------
.../ui/text/StructuredSyntaxResources.java | 2 +-
subprojects/groovy-jaxb/build.gradle | 23 ++++++++++++++++
subprojects/groovy-xml/build.gradle | 14 +++++++++-
5 files changed, 37 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/90a852b1/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 19769e8..fb913c5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -41,7 +41,6 @@ buildscript {
//classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.1.3"
classpath "gradle.plugin.com.github.jk1:gradle-license-report:0.3.2"
-
}
}
@@ -206,9 +205,6 @@ dependencies {
testCompile "org.apache.logging.log4j:log4j-core:$log4j2Version"
testCompile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
testCompile "com.thoughtworks.qdox:qdox:$qdoxVersion"
- if (JavaVersion.current().isJava9Compatible()) {
- testRuntime 'javax.xml.bind:jaxb-api:2.3.0'
- }
tools "org.pantsbuild:jarjar:$jarjarVersion"
tools "org.jboss.bridger:bridger:$bridgerVersion"
@@ -478,7 +474,6 @@ apply from: 'gradle/upload.gradle'
apply from: 'gradle/idea.gradle'
apply from: 'gradle/eclipse.gradle'
apply from: 'gradle/quality.gradle'
-apply from: 'gradle/jdk9.gradle'
apply from: 'gradle/parallel-build-fixes.gradle'
// If a local configuration file for tweaking the build is present, apply it
http://git-wip-us.apache.org/repos/asf/groovy/blob/90a852b1/gradle/jdk9.gradle
----------------------------------------------------------------------
diff --git a/gradle/jdk9.gradle b/gradle/jdk9.gradle
deleted file mode 100644
index 3f4e6b9..0000000
--- a/gradle/jdk9.gradle
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-if (JavaVersion.current().java9Compatible) {
- allprojects {
- tasks.withType(GroovyCompile) {
- groovyOptions.forkOptions.jvmArgs.addAll(['--add-modules', 'java.xml.bind'])
- }
- tasks.withType(Test) {
- jvmArgs '--add-modules', 'java.xml.bind'
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/groovy/blob/90a852b1/subprojects/groovy-console/src/main/groovy/groovy/ui/text/StructuredSyntaxResources.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/ui/text/StructuredSyntaxResources.java b/subprojects/groovy-console/src/main/groovy/groovy/ui/text/StructuredSyntaxResources.java
index 1fa1792..62beed8 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/ui/text/StructuredSyntaxResources.java
+++ b/subprojects/groovy-console/src/main/groovy/groovy/ui/text/StructuredSyntaxResources.java
@@ -41,7 +41,7 @@ public final class StructuredSyntaxResources {
// a security exception
SecurityManager mgr = System.getSecurityManager();
if (mgr != null) {
- mgr.checkSystemClipboardAccess();
+ mgr.checkPermission(new AWTPermission("accessClipboard"));
}
systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/90a852b1/subprojects/groovy-jaxb/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/groovy-jaxb/build.gradle b/subprojects/groovy-jaxb/build.gradle
index 4a27164..659f439 100644
--- a/subprojects/groovy-jaxb/build.gradle
+++ b/subprojects/groovy-jaxb/build.gradle
@@ -16,12 +16,35 @@
* specific language governing permissions and limitations
* under the License.
*/
+configurations {
+ jaxb
+ jaxbRuntime
+}
+
dependencies {
compile rootProject
testCompile project(':groovy-test')
+ jaxb 'javax.xml.bind:jaxb-api:2.3.0'
+ jaxbRuntime 'com.sun.xml.bind:jaxb-core:2.3.0.1'
+ jaxbRuntime 'com.sun.xml.bind:jaxb-impl:2.3.0.1'
+ jaxbRuntime 'javax.activation:activation:1.1.1'
}
task moduleDescriptor(type: org.codehaus.groovy.gradle.WriteExtensionDescriptorTask) {
extensionClasses = 'org.apache.groovy.jaxb.extensions.JaxbExtensions'
}
compileJava.dependsOn moduleDescriptor
+
+if (JavaVersion.current().isJava9Compatible()) {
+ tasks.withType(JavaCompile) {
+ classpath += configurations.jaxb
+ }
+ tasks.withType(GroovyCompile) {
+ groovyClasspath += configurations.jaxb
+ classpath += configurations.jaxb
+ }
+ tasks.withType(Test) {
+ classpath += configurations.jaxb
+ classpath += configurations.jaxbRuntime
+ }
+}
http://git-wip-us.apache.org/repos/asf/groovy/blob/90a852b1/subprojects/groovy-xml/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/build.gradle b/subprojects/groovy-xml/build.gradle
index cf514dd..ef25b15 100644
--- a/subprojects/groovy-xml/build.gradle
+++ b/subprojects/groovy-xml/build.gradle
@@ -16,14 +16,26 @@
* specific language governing permissions and limitations
* under the License.
*/
+configurations {
+ jaxb // just until we delete deprecated jaxb methods (moved to groovy-jaxb)
+}
+
dependencies {
compile rootProject
testCompile rootProject.sourceSets.test.runtimeClasspath
testCompile "xmlunit:xmlunit:$xmlunitVersion"
testCompile project(':groovy-test')
+ jaxb 'javax.xml.bind:jaxb-api:2.3.0'
}
task moduleDescriptor(type: org.codehaus.groovy.gradle.WriteExtensionDescriptorTask) {
extensionClasses = 'org.codehaus.groovy.runtime.XmlGroovyMethods'
}
-compileJava.dependsOn moduleDescriptor
\ No newline at end of file
+compileJava.dependsOn moduleDescriptor
+
+if (JavaVersion.current().isJava9Compatible()) {
+ tasks.withType(GroovyCompile) {
+ groovyClasspath += configurations.jaxb
+ classpath += configurations.jaxb
+ }
+}