]> source.dussan.org Git - poi.git/commitdiff
Gradle: Define japicmp settings only once, but still fails due to removed classes...
authorDominik Stadler <centic@apache.org>
Thu, 5 Jul 2018 19:55:12 +0000 (19:55 +0000)
committerDominik Stadler <centic@apache.org>
Thu, 5 Jul 2018 19:55:12 +0000 (19:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1835185 13f79535-47bb-0310-9956-ffa450edef68

build.gradle
jenkins/create_jobs.groovy

index 859999411edce5e763892c656d78b5fe274f7074..1be2664337371293b5cbeb451f7c02ffdb72439b 100644 (file)
@@ -152,6 +152,17 @@ subprojects {
             }
         }
     }
+
+    // japicmp will fail with "Could not load" because we moved some classes out of the root-package
+    // for Java 9 compatibility in 4.0.0
+    task(japicmp, type: me.champeau.gradle.ArtifactJapicmpTask, dependsOn: jar) {
+        to = jar.archivePath
+        onlyModified = true
+        onlyBinaryIncompatibleModified = true
+        failOnModification = false
+        txtOutputFile = file("$buildDir/reports/japi.txt")
+        htmlOutputFile = file("$buildDir/reports/japi.html")
+    }
 }
 
 project('main') {
@@ -189,16 +200,7 @@ project('main') {
         tests testJar
     }
 
-    // TOOD: we should not duplicate this task in each project, but I did not figure out how to inject the artifactId for each project
-    task japicmp(type: me.champeau.gradle.ArtifactJapicmpTask, dependsOn: jar) {
-        baseline = 'org.apache.poi:poi:' + japicmpversion + '@jar'
-        to = jar.archivePath
-        onlyModified = true
-        onlyBinaryIncompatibleModified = true
-        failOnModification = false
-        txtOutputFile = file("$buildDir/reports/japi.txt")
-        htmlOutputFile = file("$buildDir/reports/japi.html")
-    }
+    japicmp.baseline = 'org.apache.poi:poi:' + japicmpversion + '@jar'
 }
 
 project('ooxml') {
@@ -244,16 +246,7 @@ project('ooxml') {
         }
     }
 
-    // TODO: we should not duplicate this task in each project, but I did not figure out how to inject the artifactId for each project
-    task japicmp(type: me.champeau.gradle.ArtifactJapicmpTask, dependsOn: jar) {
-        baseline = 'org.apache.poi:poi-ooxml:' + japicmpversion + '@jar'
-        to = jar.archivePath
-        onlyModified = true
-        onlyBinaryIncompatibleModified = true
-        failOnModification = false
-        txtOutputFile = file("$buildDir/reports/japi.txt")
-        htmlOutputFile = file("$buildDir/reports/japi.html")
-    }
+    japicmp.baseline = 'org.apache.poi:poi-ooxml:' + japicmpversion + '@jar'
 }
 
 project('examples') {
@@ -263,6 +256,8 @@ project('examples') {
         compile project(':main')
         compile project(':ooxml')
     }
+
+    japicmp.enabled = false
 }
 
 
@@ -286,16 +281,7 @@ project('excelant') {
                }
        }
 
-    // TOOD: we should not duplicate this task in each project, but I did not figure out how to inject the artifactId for each project
-    task japicmp(type: me.champeau.gradle.ArtifactJapicmpTask, dependsOn: jar) {
-        baseline = 'org.apache.poi:poi-excelant:' + japicmpversion + '@jar'
-        to = jar.archivePath
-        onlyModified = true
-        onlyBinaryIncompatibleModified = true
-        failOnModification = false
-        txtOutputFile = file("$buildDir/reports/japi.txt")
-        htmlOutputFile = file("$buildDir/reports/japi.html")
-    }
+    japicmp.baseline = 'org.apache.poi:poi-excelant:' + japicmpversion + '@jar'
 }
 
 project('integrationtest') {
@@ -330,6 +316,8 @@ project('integrationtest') {
         exclude '**/*FileHandler.class'
         exclude '**/RecordStresser.class'
     }
+
+    japicmp.enabled = false
 }
 
 project('scratchpad') {
@@ -351,14 +339,5 @@ project('scratchpad') {
                }
        }
 
-    // TOOD: we should not duplicate this task in each project, but I did not figure out how to inject the artifactId for each project
-    task japicmp(type: me.champeau.gradle.ArtifactJapicmpTask, dependsOn: jar) {
-        baseline = 'org.apache.poi:poi-scratchpad:' + japicmpversion + '@jar'
-        to = jar.archivePath
-        onlyModified = true
-        onlyBinaryIncompatibleModified = true
-        failOnModification = false
-        txtOutputFile = file("$buildDir/reports/japi.txt")
-        htmlOutputFile = file("$buildDir/reports/japi.html")
-    }
+    japicmp.baseline = 'org.apache.poi:poi-scratchpad:' + japicmpversion + '@jar'
 }
index b22ad2f6596ed9d74b9dfed2b97db270434483f1..5dabe79d526f9a337740063b254c41e7525ec9fa 100644 (file)
@@ -64,6 +64,7 @@ def poijobs = [
         ],
         [ name: 'POI-DSL-regenerate-javadoc', trigger: triggerSundays, javadoc: true
         ],
+        // disabled for 4.0.0 because we break compatibility on-purpose in a few places, e.g. for Java 9 compatibility
         [ name: 'POI-DSL-API-Check', trigger: '@daily', apicheck: true, disabled: true
         ],
         [ name: 'POI-DSL-Gradle', trigger: triggerSundays, email: 'centic@apache.org', gradle: true,