Generate proper sources jar for compiler-embeddable, fixing problem with locating embeddable compiler jar in tests, revealed by the change
KT-8487
This commit is contained in:
committed by
Alexey Tsvetkov
parent
66f1f87757
commit
d4a86b7f6d
+6
-2
@@ -36,8 +36,12 @@ public class CompilerSmokeTest {
|
||||
|
||||
private val javaExecutable = File( File(System.getProperty("java.home"), "bin"), "java")
|
||||
|
||||
private val embeddableJar = File(".").listFiles { it -> it.name.startsWith("kotlin-compiler-embeddable", ignoreCase = true) && it.name.endsWith(".jar", ignoreCase = true) }?.firstOrNull()
|
||||
?: throw FileNotFoundException("cannot find kotlin-compiler-embeddable*.jar in the directory " + File(".").absolutePath)
|
||||
private val embeddableJar: File by lazy {
|
||||
val f = File(System.getProperty("compilerJar") ?: "kotlin-compiler-embeddable.jar")
|
||||
if (!f.exists())
|
||||
throw FileNotFoundException("cannot find kotlin-compiler-embeddable.jar ($f)")
|
||||
f
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSmoke() {
|
||||
|
||||
Reference in New Issue
Block a user