Bug 60134: Add initial tasks for running japicmp to the Gradle build
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1764960 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7f9f8e9afa
commit
b51eb49e58
70
build.gradle
70
build.gradle
@ -14,6 +14,15 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.1'
|
||||
}
|
||||
}
|
||||
|
||||
// For help converting an Ant build to a Gradle build, see
|
||||
// https://docs.gradle.org/current/userguide/ant.html
|
||||
@ -52,7 +61,13 @@ subprojects {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
// See https://github.com/melix/japicmp-gradle-plugin
|
||||
apply plugin: 'me.champeau.gradle.japicmp'
|
||||
|
||||
version = '3.16-beta1'
|
||||
ext {
|
||||
japicmpversion = '3.15'
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
@ -102,6 +117,9 @@ subprojects {
|
||||
jacoco {
|
||||
toolVersion = '0.7.7.201606060606'
|
||||
}
|
||||
|
||||
// ensure the build-dir exists
|
||||
projectDir.mkdirs()
|
||||
}
|
||||
|
||||
project('main') {
|
||||
@ -130,6 +148,17 @@ project('main') {
|
||||
artifacts {
|
||||
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
|
||||
// not available, see issue #6: onlyBinaryIncompatibleModified = true
|
||||
failOnModification = false
|
||||
txtOutputFile = file("$buildDir/reports/japi.txt")
|
||||
// not available, see issue #6: htmlOutputFile = file("$buildDir/reports/japi.html")
|
||||
}
|
||||
}
|
||||
|
||||
project('ooxml') {
|
||||
@ -162,6 +191,17 @@ project('ooxml') {
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile project(path: ':main', configuration: 'tests')
|
||||
}
|
||||
|
||||
// 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-ooxml:' + japicmpversion + '@jar'
|
||||
to = jar.archivePath
|
||||
onlyModified = true
|
||||
// not available, see issue #6: onlyBinaryIncompatibleModified = true
|
||||
failOnModification = false
|
||||
txtOutputFile = file("$buildDir/reports/japi.txt")
|
||||
// not available, see issue #6: htmlOutputFile = file("$buildDir/reports/japi.html")
|
||||
}
|
||||
}
|
||||
|
||||
project('examples') {
|
||||
@ -187,6 +227,17 @@ project('excelant') {
|
||||
|
||||
testCompile project(path: ':main', configuration: 'tests')
|
||||
}
|
||||
|
||||
// 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
|
||||
// not available, see issue #6: onlyBinaryIncompatibleModified = true
|
||||
failOnModification = false
|
||||
txtOutputFile = file("$buildDir/reports/japi.txt")
|
||||
// not available, see issue #6: htmlOutputFile = file("$buildDir/reports/japi.html")
|
||||
}
|
||||
}
|
||||
|
||||
project('integrationtest') {
|
||||
@ -229,12 +280,15 @@ project('scratchpad') {
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile project(path: ':main', configuration: 'tests')
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Notes:
|
||||
*
|
||||
* See https://github.com/melix/japicmp-gradle-plugin and
|
||||
* https://github.com/codehaus/groovy-git/blob/7f940159920d4ea5bc727cfcbef8aba9b48c5e50/gradle/binarycompatibility.gradle for an example of using japicmp
|
||||
*
|
||||
**/
|
||||
// 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
|
||||
// not available, see issue #6: onlyBinaryIncompatibleModified = true
|
||||
failOnModification = false
|
||||
txtOutputFile = file("$buildDir/reports/japi.txt")
|
||||
// not available, see issue #6: htmlOutputFile = file("$buildDir/reports/japi.html")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user