groovy git commit: some build fixes for Gradle 4.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

groovy git commit: some build fixes for Gradle 4.0

paulk
Repository: groovy
Updated Branches:
  refs/heads/master da78c07c6 -> 23e609392


some build fixes for Gradle 4.0


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

Branch: refs/heads/master
Commit: 23e6093921e06fcd73dabe67ce5be549a6cd63f9
Parents: da78c07
Author: paulk <[hidden email]>
Authored: Sun Jun 18 22:28:21 2017 +1000
Committer: paulk <[hidden email]>
Committed: Sun Jun 18 22:28:21 2017 +1000

----------------------------------------------------------------------
 build.gradle                                              | 10 +++++-----
 .../groovy/gradle/WriteExtensionDescriptorTask.groovy     |  2 +-
 gradle/docs.gradle                                        |  5 +++--
 .../org/codehaus/groovy/ant/GroovycTest.xml               |  2 +-
 .../org/codehaus/groovy/ant/GroovycTest1.groovy           |  2 +-
 .../test/groovy/org/codehaus/groovy/ant/GroovycTest.java  |  2 +-
 subprojects/groovy-groovydoc/build.gradle                 |  2 +-
 .../src/test/resources/groovydoc/groovyDocTests.xml       |  5 +++--
 8 files changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/23e60939/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 2a61c9c..5edfed8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -339,14 +339,14 @@ processResources.doLast {
             include 'groovy/inspect/swingui/AstBrowserProperties.groovy',
                     'org/codehaus/groovy/tools/groovydoc/gstringTemplates/GroovyDocTemplateInfo.java'
         }
-        into sourceSets.main.output.classesDir
+        into sourceSets.main.java.outputDir
     }
 }
 
 tasks.withType(Jar) {
     doFirst {
         ant.java(classname:'org.jboss.bridger.Bridger', classpath: rootProject.configurations.tools.asPath, outputproperty: 'stdout') {
-            arg(value: "${sourceSets.main.output.classesDir.canonicalPath}/org/codehaus/groovy/runtime/DefaultGroovyMethods.class")
+            arg(value: "${sourceSets.main.java.outputDir.canonicalPath}/org/codehaus/groovy/runtime/DefaultGroovyMethods.class")
         }
         ant.echo('Bridger: ' + ant.properties.stdout)
     }
@@ -387,8 +387,8 @@ apply from: 'gradle/wrapper.gradle'
 
 task dgmConverter(dependsOn:compileJava) {
     description = 'Generates DGM info file required for faster startup.'
-    def classesDir = sourceSets.main.output.classesDir
-    def classpath = files(classesDir, configurations.compile)
+    def classesDir = sourceSets.main.java.outputDir
+    def classpath = files(sourceSets.main.output.classesDirs, configurations.compile)
 
     //main = 'org.codehaus.groovy.tools.DgmConverter'
     //args = ['--info', classesDir.absolutePath]
@@ -428,7 +428,7 @@ task bootstrapJar {
         destinationDir.mkdirs()
         ant.jar(
                 destfile: archivePath,
-                basedir: file(sourceSets.main.output.classesDir)
+                basedir: file(sourceSets.main.java.outputDir)
         )
     }
     inputs.property('indy', useIndy())

http://git-wip-us.apache.org/repos/asf/groovy/blob/23e60939/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy b/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
index a5e716f..679b083 100644
--- a/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
+++ b/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
@@ -36,7 +36,7 @@ class WriteExtensionDescriptorTask extends DefaultTask {
 
 
     private File computeDescriptorFile() {
-        def metaInfDir = new File("${project.buildDir}/classes/main/META-INF/services")
+        def metaInfDir = new File("${project.buildDir}/resources/main/META-INF/services")
         return new File(metaInfDir, "org.codehaus.groovy.runtime.ExtensionModule")
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/23e60939/gradle/docs.gradle
----------------------------------------------------------------------
diff --git a/gradle/docs.gradle b/gradle/docs.gradle
index 15c3134..90fbe55 100644
--- a/gradle/docs.gradle
+++ b/gradle/docs.gradle
@@ -111,7 +111,7 @@ groovydocAll groovydocSpec
 // but the file is only generated by the 'jar' task, so as a workaround, we copy
 // it into the docgenerator classes
 task docProjectVersionInfo(type: Copy) {
-    destinationDir = file("${project(':groovy-docgenerator').buildDir}/classes/main")
+    destinationDir = file("${project(':groovy-docgenerator').sourceSets.main.java.outputDir}")
     into('META-INF') {
         from('src/main/META-INF/groovy-release-info.properties') {
             filter(rootProject.propertiesFilter, org.apache.tools.ant.filters.ReplaceTokens)
@@ -129,13 +129,14 @@ task docGDK {
     ext.destinationDir = "$buildDir/html/groovy-jdk"
     inputs.files sourceSets.main.runtimeClasspath + configurations.tools
     outputs.dir destinationDir
+    def docGeneratorPath = files(project(':groovy-docgenerator').sourceSets.main.output.classesDirs)
     doLast { task ->
         try {
             ant {
                 java(classname: 'org.codehaus.groovy.tools.DocGenerator',
                      fork: 'true',
                      failonerror: 'true',
-                     classpath: (sourceSets.main.runtimeClasspath + configurations.tools + groovydocAll.groovyClasspath).asPath,
+                     classpath: (sourceSets.main.runtimeClasspath + configurations.tools + groovydocAll.groovyClasspath + docGeneratorPath).asPath,
                      errorproperty: 'edr',
                      outputproperty: 'odr') {
                     arg(value: '-title')

http://git-wip-us.apache.org/repos/asf/groovy/blob/23e60939/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml
index 5e2afba..05e33f4 100644
--- a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml
+++ b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml
@@ -23,7 +23,7 @@
 <project name="Test Groovyc Task" default="test1">
 
     <property name="srcPath" value="."/>
-    <property name="destPath" value="${user.dir}/target/classes/test"/>
+    <property name="destPath" value="${user.dir}/target/classes/groovy/test"/>
 
     <property name="javaVersion" value="6"/>
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/23e60939/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest1.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest1.groovy b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest1.groovy
index a0694ab..32e73ac 100644
--- a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest1.groovy
+++ b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest1.groovy
@@ -20,6 +20,6 @@ package org.codehaus.groovy.ant
 
 class GroovycTest1 {
   static void main ( String[] args ) {
-    ( new File ( 'target/classes/test/org/codehaus/groovy/ant/GroovycTest1_Result.txt' ) ).write ( 'OK.' )
+    ( new File ( 'target/classes/groovy/test/org/codehaus/groovy/ant/GroovycTest1_Result.txt' ) ).write ( 'OK.' )
   }
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/23e60939/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java b/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java
index 8dae0aa..81e0253 100644
--- a/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java
+++ b/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java
@@ -37,7 +37,7 @@ import java.util.regex.Pattern;
  * @author Russel Winder
  */
 public class GroovycTest extends GroovyTestCase {
-    private final String classDirectory = "target/classes/test/org/codehaus/groovy/ant/";
+    private final String classDirectory = "target/classes/groovy/test/org/codehaus/groovy/ant/";
     private final File antFile = new File("src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml");
     private Project project;
     private static boolean warned = false;

http://git-wip-us.apache.org/repos/asf/groovy/blob/23e60939/subprojects/groovy-groovydoc/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/build.gradle b/subprojects/groovy-groovydoc/build.gradle
index 421bfb7..6dda7b6 100644
--- a/subprojects/groovy-groovydoc/build.gradle
+++ b/subprojects/groovy-groovydoc/build.gradle
@@ -27,6 +27,6 @@ dependencies {
 
 compileJava {
     doLast {
-        mkdir "$sourceSets.main.output.classesDir/META-INF"
+        mkdir "$sourceSets.main.java.outputDir/META-INF"
     }
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/23e60939/subprojects/groovy-groovydoc/src/test/resources/groovydoc/groovyDocTests.xml
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/test/resources/groovydoc/groovyDocTests.xml b/subprojects/groovy-groovydoc/src/test/resources/groovydoc/groovyDocTests.xml
index d1aa402..7c76e1b 100644
--- a/subprojects/groovy-groovydoc/src/test/resources/groovydoc/groovyDocTests.xml
+++ b/subprojects/groovy-groovydoc/src/test/resources/groovydoc/groovyDocTests.xml
@@ -24,8 +24,9 @@
     <property name="tmpdir" value="${java.io.tmpdir}/${user.name}/${ant.project.name}"/>
 
     <path id="classpath">
-        <fileset dir="target/classes/main" includes="**/*.*"/>
-        <fileset dir="target/classes/test" includes="**/*.*"/>
+        <fileset dir="target/classes/java/main" includes="**/*.*"/>
+        <fileset dir="target/classes/groovy/main" includes="**/*.*"/>
+        <fileset dir="target/classes/groovy/test" includes="**/*.*"/>
     </path>
 
     <taskdef name="groovydoc" classpathref="classpath"