Restore embeddable compiler smoke test
also move sources and testdata to the appropriate place
This commit is contained in:
@@ -2,15 +2,25 @@
|
||||
description = "Kotlin Compiler (embeddable)"
|
||||
|
||||
plugins {
|
||||
`java`
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
val testCompilationClasspath by configurations.creating
|
||||
|
||||
dependencies {
|
||||
runtime(kotlinStdlib())
|
||||
runtime(project(":kotlin-script-runtime"))
|
||||
runtime(project(":kotlin-reflect"))
|
||||
runtime(project(":kotlin-daemon-embeddable"))
|
||||
runtime(commonDep("org.jetbrains.intellij.deps", "trove4j"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
||||
testCompilationClasspath(kotlinStdlib())
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
publish()
|
||||
@@ -22,7 +32,7 @@ compilerDummyJar(compilerDummyForDependenciesRewriting("compilerDummy") {
|
||||
classifier = "dummy"
|
||||
})
|
||||
|
||||
runtimeJar(embeddableCompiler()) {
|
||||
val runtimeJar = runtimeJar(embeddableCompiler()) {
|
||||
exclude("com/sun/jna/**")
|
||||
exclude("org/jetbrains/annotations/**")
|
||||
mergeServiceFiles()
|
||||
@@ -31,3 +41,14 @@ runtimeJar(embeddableCompiler()) {
|
||||
sourcesJar()
|
||||
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("compilationClasspath", testCompilationClasspath.asPath)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user