File tree Expand file tree Collapse file tree 3 files changed +20
-19
lines changed Expand file tree Collapse file tree 3 files changed +20
-19
lines changed Original file line number Diff line number Diff line change 44
44
- name : Compile libraries and tests
45
45
run : ./gradlew clean testClasses
46
46
47
- - name : Build archives
48
- run : ./gradlew assemble
49
-
50
47
- name : Set up JDK ${{ matrix.java }}
51
48
uses : actions/setup-java@v3
52
49
with :
56
53
- name : Run tests against JDK17-compiled code
57
54
run : ./gradlew test --exclude-task compileJava
58
55
56
+ - name : Archive HTML test report on failure
57
+ if : ${{ failure() }}
58
+ uses : actions/upload-artifact@v3
59
+ with :
60
+ name : test-reports-java17-java${{ matrix.java }}-${{ matrix.distribution }}-html
61
+ path : " */build/reports/**"
62
+
63
+ - name : Build and test with JDK ${{ matrix.java }}
64
+ run : ./gradlew clean test
65
+
66
+ - name : Build archives
67
+ run : ./gradlew assemble
68
+
59
69
- name : Archive HTML test report
60
70
if : ${{ always() }}
61
71
uses : actions/upload-artifact@v3
71
81
path : " */build/test-results/**/*.xml"
72
82
73
83
- name : Check binary reproducibility
84
+ if : ${{ matrix.java != 8 }} # JDK 8 does not produce reproducible binaries
74
85
run : |
75
86
./gradlew clean primaryPublishJar
76
87
find . -name '*.jar' | xargs sha256sum | tee checksums.sha256sum
Original file line number Diff line number Diff line change @@ -2,22 +2,15 @@ plugins {
2
2
java
3
3
}
4
4
5
- java {
6
- toolchain {
7
- // Java 8 binaries are not reproducible
8
- languageVersion.set(JavaLanguageVersion .of(11 ))
9
- }
10
- }
11
-
12
5
tasks.withType(JavaCompile ::class ) {
13
6
options.compilerArgs.add(" -Xlint:deprecation" )
14
7
options.compilerArgs.add(" -Xlint:unchecked" )
15
8
options.encoding = " UTF-8"
16
- options.release.set(8 )
17
- }
18
9
19
- tasks.withType(Test ::class ) {
20
- javaLauncher.set(javaToolchains.launcherFor {
21
- languageVersion.set(JavaLanguageVersion .of(8 ))
22
- })
10
+ if (JavaVersion .current().isJava9Compatible) {
11
+ options.release.set(8 )
12
+ } else {
13
+ targetCompatibility = " 1.8"
14
+ sourceCompatibility = " 1.8"
15
+ }
23
16
}
Original file line number Diff line number Diff line change @@ -8,7 +8,4 @@ tasks.withType(ScalaCompile::class) {
8
8
// See: https://github.com/gradle/gradle/pull/23198
9
9
// See: https://github.com/gradle/gradle/pull/23751
10
10
scalaCompileOptions.additionalParameters = mutableListOf (" -Wunused" )
11
- javaLauncher.set(javaToolchains.launcherFor {
12
- languageVersion.set(JavaLanguageVersion .of(8 ))
13
- })
14
11
}
You can’t perform that action at this time.
0 commit comments