Skip to content

Commit 64d7668

Browse files
committed
Configure japicc task to check source and binary compatibility
1 parent 9ec806f commit 64d7668

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,33 @@ subprojects { subproj ->
267267
if (subproj.name in platformProjects) {
268268
subproj.group = platformGroup
269269
subproj.version = platformVersion
270+
subproj.baseline = platformBaseline
270271
}
271272
else if (subproj.name in vintageProjects) {
272273
subproj.group = vintageGroup
273274
subproj.version = vintageVersion
275+
subproj.baseline = vintageBaseline
276+
}
277+
278+
configurations {
279+
base
280+
}
281+
282+
dependencies {
283+
base(group: subproj.group, name: subproj.name, version: subproj.baseline) {
284+
force = true
285+
transitive = false
286+
}
287+
}
288+
289+
task japicc(type: Exec, dependsOn: assemble) {
290+
// Requires https://github.com/lvc/japi-compliance-checker to be installed
291+
def reportPath = "$buildDir/reports/japicc-${subproj.name}.html"
292+
inputs.file configurations.base[0]
293+
inputs.file jar.archivePath
294+
outputs.file reportPath
295+
commandLine 'japi-compliance-checker', configurations.base[0], jar.archivePath, '-report-path', reportPath
296+
ignoreExitValue = true
274297
}
275298

276299
javadoc {

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
group = org.junit.jupiter
22
version = 5.1.0-SNAPSHOT
3+
baseline = 5.0.3
34

45
platformGroup = org.junit.platform
56
platformVersion = 1.1.0-SNAPSHOT
7+
platformBaseline = 1.0.3
68

79
vintageGroup = org.junit.vintage
810
vintageVersion = 5.1.0-SNAPSHOT
11+
vintageBaseline = 4.12.3
912

1013
# --release release
1114
# Compiles against the public, supported and documented API for a specific VM version.

junit-platform-console-standalone/junit-platform-console-standalone.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ javadoc {
4040

4141
jar.enabled = false
4242
test.enabled = false // prevent supposed-to-fail integration tests from failing the build
43+
japicc.enabled = false
4344

4445
shadowJar {
4546
// Generate shadow jar only if the underlying manifest was regenerated.

0 commit comments

Comments
 (0)