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/04/03 07:39:20 UTC

groovy git commit: re-enable binary compat report within branch

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X a2940eb17 -> 325f102b8


re-enable binary compat report within branch


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

Branch: refs/heads/GROOVY_2_4_X
Commit: 325f102b85fcac38eee40938bdc3a2cacc9b65f2
Parents: a2940eb
Author: Paul King <pa...@asert.com.au>
Authored: Tue Apr 3 17:39:12 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Tue Apr 3 17:39:12 2018 +1000

----------------------------------------------------------------------
 build.gradle                      |  2 +-
 gradle/binarycompatibility.gradle | 68 +++++++++++++++++++---------------
 gradle/quality.gradle             |  3 +-
 3 files changed, 40 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/325f102b/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index ecaac4d..88bf3a0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -36,7 +36,7 @@ buildscript {
         classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.7'
         classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.3'
         classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1'
-        //classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.1'
+        classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.1'
         //classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
         classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.1.3"
         classpath 'com.gradle:build-scan-plugin:1.8'

http://git-wip-us.apache.org/repos/asf/groovy/blob/325f102b/gradle/binarycompatibility.gradle
----------------------------------------------------------------------
diff --git a/gradle/binarycompatibility.gradle b/gradle/binarycompatibility.gradle
index f4c91f4..bebfe04 100644
--- a/gradle/binarycompatibility.gradle
+++ b/gradle/binarycompatibility.gradle
@@ -37,9 +37,16 @@ task checkBinaryCompatibility {
 }
 check.dependsOn(checkBinaryCompatibility)
 
+def excludeModules = ['performance', 'tests-vm8']
+//def excludeModules = []
+
+Set projectsToCheck = allprojects.findAll{ !(it.name in excludeModules) }
+
 if (JavaVersion.current().isJava7Compatible()) {
     allprojects {
-        apply plugin: 'me.champeau.gradle.japicmp'
+        if (project in projectsToCheck) {
+            apply plugin: 'me.champeau.gradle.japicmp'
+        }
     }
 
     def referenceMinorVersion = '2.4.15'
@@ -140,7 +147,7 @@ if (JavaVersion.current().isJava7Compatible()) {
         txtOutputFile = file("$buildDir/reports/japi.txt")
 
         doFirst {
-            classpath = allprojects.configurations.japicmp.files.flatten()
+            classpath = projectsToCheck.configurations.japicmp.files.flatten()
         }
 
         def htmlReportFile = file("${buildDir}/reports/binary-compat-${project.name}-all.html")
@@ -162,37 +169,39 @@ if (JavaVersion.current().isJava7Compatible()) {
     }
 
     allprojects {
+        if (project in projectsToCheck) {
 
-        dependencies  {
-            japicmp files(rootProject.jar.archivePath)
-        }
+            dependencies  {
+                japicmp files(rootProject.jar.archivePath)
+            }
 
-        task japicmp(type: me.champeau.gradle.ArtifactJapicmpTask) {
-            dependsOn replaceJarWithJarJar
-            baseline = "org.codehaus.groovy:${project.name}:${referenceMinorVersion}@jar"
-            to = jar.archivePath
-            accessModifier = 'protected'
-            onlyModified = true
-            failOnModification = false
-            txtOutputFile = file("$buildDir/reports/japi.txt")
-
-            def htmlReportFile = file("${buildDir}/reports/binary-compat-${project.name}.html")
-            inputs.file file("$configDir/$templateFile")
-            inputs.file templateFile
-            outputs.file htmlReportFile
-
-            def model = [title   : "Binary compatibility report for ${project.name}",
-                         project : project,
-                         baseline: baseline,
-                         archive : to.name]
-            outputProcessor(reportGenerator.curry(model))
-
-            doLast {
-                htmlReportFile.withWriter('utf-8') { wrt ->
-                    engine.createTemplateByPath(templateFile).make(model).writeTo(wrt)
+            task japicmp(type: me.champeau.gradle.ArtifactJapicmpTask) {
+                dependsOn replaceJarWithJarJar
+                baseline = "org.codehaus.groovy:${project.name}:${referenceMinorVersion}@jar"
+                to = jar.archivePath
+                accessModifier = 'protected'
+                onlyModified = true
+                failOnModification = false
+                txtOutputFile = file("$buildDir/reports/japi.txt")
+
+                def htmlReportFile = file("${buildDir}/reports/binary-compat-${project.name}.html")
+                inputs.file file("$configDir/$templateFile")
+                inputs.file templateFile
+                outputs.file htmlReportFile
+
+                def model = [title   : "Binary compatibility report for ${project.name}",
+                             project : project,
+                             baseline: baseline,
+                             archive : to.name]
+                outputProcessor(reportGenerator.curry(model))
+
+                doLast {
+                    htmlReportFile.withWriter('utf-8') { wrt ->
+                        engine.createTemplateByPath(templateFile).make(model).writeTo(wrt)
+                    }
                 }
-            }
 
+            }
         }
     }
 
@@ -200,6 +209,5 @@ if (JavaVersion.current().isJava7Compatible()) {
         tasks.withType(me.champeau.gradle.ArtifactJapicmpTask) { task ->
             checkBinaryCompatibility.dependsOn(task)
         }
-
     }
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/325f102b/gradle/quality.gradle
----------------------------------------------------------------------
diff --git a/gradle/quality.gradle b/gradle/quality.gradle
index 5be87cf..39feb43 100644
--- a/gradle/quality.gradle
+++ b/gradle/quality.gradle
@@ -185,5 +185,4 @@ rat {
 }
 
 apply from: 'gradle/jacoco/jacoco.gradle'
-// Temporarily disabled because of conflict
-//apply from: 'gradle/binarycompatibility.gradle'
+apply from: 'gradle/binarycompatibility.gradle'