[Gradle, native] Blacklist java.endorsed.dirs for all tools

System property java.endorsed.dirs is set by IDEA but not supported
since Java 9 preventing starting a JVM. This patch takes this into
account and blacklists this property for all K/N tools including
the commonizer.

See also:
https://youtrack.jetbrains.com/issue/IDEA-193219
https://youtrack.jetbrains.com/issue/KT-25887
This commit is contained in:
Ilya Matveev
2020-04-06 18:57:29 +07:00
parent ba6ca67e4f
commit 02c4008690
2 changed files with 1 additions and 2 deletions
@@ -25,7 +25,7 @@ internal abstract class KotlinToolRunner(
open val environmentBlacklist: Set<String> = emptySet()
open val systemProperties: Map<String, String> = emptyMap()
open val systemPropertiesBlacklist: Set<String> = emptySet()
open val systemPropertiesBlacklist: Set<String> = setOf("java.endorsed.dirs")
abstract val classpath: Set<File>
open fun checkClasspath(): Unit = check(classpath.isNotEmpty()) { "Classpath of the tool is empty: $displayName" }
@@ -59,7 +59,6 @@ internal abstract class KotlinNativeToolRunner(
"java.library.path" to "${project.konanHome}/konan/nativelib"
)
}
final override val systemPropertiesBlacklist = setOf("java.endorsed.dirs")
final override val classpath by lazy {
project.fileTree("${project.konanHome}/konan/lib/").apply { include("*.jar") }.toSet()