You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on my tries with using Java toolchain for testing the plugin itself, it seems that PIT in PitestTask is executed with the JVM which was used to start the Gradle process, not the one selected with the toolchain options.
Just wanted to comment that I recently ran into this issue.
I've a project that uses gradle toolchain set to jdk 17, and this is also my default jdk on classpath.
When working on that project, others who had jdk11 on their classpath, they could run pitest but all they saw was a report with 0 coverage and in logs they could read Could not load kata.Application kata/Application has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0.
Based on my tries with using Java toolchain for testing the plugin itself, it seems that PIT in PitestTask is executed with the JVM which was used to start the Gradle process, not the one selected with the toolchain options.
JavaExec
in Gradle 6.9.1 allows to setjavaLauncher
, so it should be possible to achieve:https://docs.gradle.org/current/userguide/toolchains.html#sec:plugins
Update. The PoC confirmed that, however, there is some more work around to make it usable for CI and for external contributors.
The text was updated successfully, but these errors were encountered: