Build: Fix kotlin-compiler-embeddable test runtime
This commit is contained in:
@@ -6,6 +6,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val testCompilationClasspath by configurations.creating
|
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 {
|
dependencies {
|
||||||
runtimeOnly(kotlinStdlib())
|
runtimeOnly(kotlinStdlib())
|
||||||
@@ -44,9 +52,7 @@ javadocJar()
|
|||||||
projectTest {
|
projectTest {
|
||||||
dependsOn(runtimeJar)
|
dependsOn(runtimeJar)
|
||||||
doFirst {
|
doFirst {
|
||||||
val runtimeJarConfig = configurations["runtimeJar"]
|
systemProperty("compilerClasspath", "${runtimeJar.get().outputs.files.asPath}${File.pathSeparator}${testCompilerClasspath.asPath}")
|
||||||
val runtimeConfig = configurations["runtime"]
|
|
||||||
systemProperty("compilerClasspath", "${runtimeJarConfig.allArtifacts.files.files.first().path}${File.pathSeparator}${runtimeConfig.asPath}")
|
|
||||||
systemProperty("compilationClasspath", testCompilationClasspath.asPath)
|
systemProperty("compilationClasspath", testCompilationClasspath.asPath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user