Build things with JDK 17, but preserve Java 8 compat anyway #3137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, publishing fails because:
0.12.x
publish tasks require JDK >= 11--require 8
to javac and scalacsun.misc.Signal
stuff), and neither javac nor scalac accept options to enable access to it alongside--release 8
(javac doesn't accept--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED
alongside--release
, and scalac doesn't allow passing such an option altogether anyway, see Support alternative JVM system images (via-system
, like javac) scala/scala#10801)To work around that, this PR:
--release 8
to scalaccache-util
module-source 8 -target 8 -bootclasspath some-jdk-8/jre/lib/rt.jar
to javac in order to allow access to unsupported JDK APIs