[kotlin gradle plugin] enable to work with embedded k/n compiler.

This commit is contained in:
Vasily Levchenko
2021-07-09 14:39:46 +02:00
committed by Space
parent 1eb951749d
commit 2baf344f5f
8 changed files with 38 additions and 5 deletions
@@ -27,8 +27,8 @@ object KonanHomeProvider {
val jarPath = PathUtil.getResourcePathForClass(this::class.java)
// Check that the path obtained really points to the distribution.
val expectedRelativeJarPath = Paths.get("konan/lib/kotlin-native.jar")
check(jarPath.toPath().endsWith(expectedRelativeJarPath)) {
check(jarPath.toPath().endsWith(Paths.get("konan/lib/kotlin-native.jar")) ||
jarPath.toPath().endsWith(Paths.get("konan/lib/kotlin-native-compiler-embeddable.jar"))) {
val classesPath = if (jarPath.extension == "jar") jarPath else jarPath.parentFile
"""
Cannot determine a compiler distribution directory.