Skip to content

Adjust -source/-target using java_compat_level

OpenJDK 21 removed support for -source/-target value of 7/1.7. This means packages that use 7/1.7 will not compile. Also, packages using value 8/1.8 will see a deprecation warning.

java-common introduces $java_compat_level which could be used to set the appropriate value for -source/-target. Also, we can turn off the deprecation warning (and failures due to -Werror) using "-Xlint:-options".

Merge request reports

Loading