Draft: Sanity check build with JDK 18 on CI
Add basic JDK 18 tests on CI with Temurin.
Unfortunately, Gradle 7.4.1/2 refuses to play with JDK 18:
* What went wrong:
A problem occurred evaluating project ':spock-specs'.
> Could not resolve all dependencies for configuration ':spock-specs:jacocoAgentRuntime'.
> Failed to query the value of task ':spock-specs:compileGroovy' property 'javaLauncher'.
> No compatible toolchains found for request filter: {languageVersion=18, vendor=any, implementation=vendor-specific} (auto-detect true, auto-download false)
However, it builds fine locally with JDK 18. Is it "just" a toolchain detection issue which could be easily overridden or Gradle 7.5 is a must?
Codecov Report
Merging #1457 (00b5e4d) into master (7fa3d62) will increase coverage by
0.00%. The diff coverage isn/a.
:exclamation: Current head 00b5e4d differs from pull request most recent head f65b7b9. Consider uploading reports for the commit f65b7b9 to get more accurate results
@@ Coverage Diff @@
## master #1457 +/- ##
=========================================
Coverage 79.59% 79.59%
+ Complexity 4010 4005 -5
=========================================
Files 404 404
Lines 12563 12562 -1
Branches 1641 1640 -1
=========================================
Hits 9999 9999
- Misses 1969 1971 +2
+ Partials 595 592 -3
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...main/java/org/spockframework/compiler/AstUtil.java | 79.57% <0.00%> (-0.71%) |
:arrow_down: |
| ...java/org/spockframework/compiler/SpecRewriter.java | 93.69% <0.00%> (-0.02%) |
:arrow_down: |
| .../spockframework/gentyref/GenericTypeReflector.java | 35.23% <0.00%> (ø) |
|
| ...rg/spockframework/runtime/MasterRunSupervisor.java | 82.25% <0.00%> (+1.61%) |
:arrow_up: |
| .../main/java/org/spockframework/gentyref/VarMap.java | 74.19% <0.00%> (+3.22%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 7fa3d62...f65b7b9. Read the comment docs.
While the toolchain is fixed, one test fails with JDK18 (Temurin 18.0.1+10) on CI: https://github.com/spockframework/spock/runs/6235781892?check_suite_focus=true#step:4:141
PartialMockingInterfacesWithDefaultMethods > IQuarterlyCompoundedDeposit: should throw unchecked exception for negative values of principalAmount FAILED
Expected exception of type 'java.lang.IllegalArgumentException', but got 'java.lang.reflect.UndeclaredThrowableException'
but locally everything passes with JDK 18 (OpenJDK 18+37 by RedHat)...
As we have test run for Java 21 now, this PR is obsolete, isn't it?