Restore embeddable compiler smoke test

also move sources and testdata to the appropriate place
This commit is contained in:
Ilya Chernikov
2019-10-02 11:03:05 +02:00
parent cd4cce3f9f
commit 1a8bcee86c
3 changed files with 45 additions and 14 deletions
+23 -2
View File
@@ -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)
}
}