Apply illegal-access=permit workaround for JDK 16+

Apparently, the openjdk commit that enabled JEP 396 (encapsulated JDK
defaults) is effective since jdk-16+28:

https://github.com/openjdk/jdk/commit/ed4c4ee7
This commit is contained in:
Alexander Udalov
2021-02-10 12:28:41 +01:00
parent 4b62b2de0c
commit 80daf120e6
@@ -376,7 +376,7 @@ object KotlinCompilerClient {
"-D$JAVA_RMI_SERVER_HOSTNAME=$serverHostname")
val javaVersion = System.getProperty("java.specification.version")?.toIntOrNull()
val javaIllegalAccessWorkaround =
if (javaVersion != null && javaVersion >= 17)
if (javaVersion != null && javaVersion >= 16)
listOf("--illegal-access=permit")
else emptyList()
val args = listOf(