Build: Fix kotlin-compiler-embeddable test runtime
This commit is contained in:
@@ -6,6 +6,14 @@ plugins {
|
||||
}
|
||||
|
||||
val testCompilationClasspath by configurations.creating
|
||||
val testCompilerClasspath by configurations.creating {
|
||||
isCanBeConsumed = false
|
||||
extendsFrom(configurations["runtimeElements"])
|
||||
attributes {
|
||||
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.LIBRARY))
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
runtimeOnly(kotlinStdlib())
|
||||
@@ -44,9 +52,7 @@ javadocJar()
|
||||
projectTest {
|
||||
dependsOn(runtimeJar)
|
||||
doFirst {
|
||||
val runtimeJarConfig = configurations["runtimeJar"]
|
||||
val runtimeConfig = configurations["runtime"]
|
||||
systemProperty("compilerClasspath", "${runtimeJarConfig.allArtifacts.files.files.first().path}${File.pathSeparator}${runtimeConfig.asPath}")
|
||||
systemProperty("compilerClasspath", "${runtimeJar.get().outputs.files.asPath}${File.pathSeparator}${testCompilerClasspath.asPath}")
|
||||
systemProperty("compilationClasspath", testCompilationClasspath.asPath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user