Files
kotlin-fork/libraries/scripting/jvm-host-test/build.gradle.kts
T
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00

62 lines
2.1 KiB
Kotlin

plugins {
kotlin("jvm")
}
val allTestsRuntime by configurations.creating
val testApi by configurations
testApi.extendsFrom(allTestsRuntime)
val embeddableTestRuntime by configurations.creating {
extendsFrom(allTestsRuntime)
}
dependencies {
allTestsRuntime(commonDependency("junit"))
allTestsRuntime(intellijCore())
testApi(project(":kotlin-scripting-jvm-host-unshaded"))
testApi(projectTests(":compiler:tests-common"))
testApi(project(":kotlin-scripting-compiler"))
testApi(project(":daemon-common")) // TODO: fix import (workaround for jps build)
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
testRuntimeOnly(project(":kotlin-compiler"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
embeddableTestRuntime(project(":kotlin-scripting-jvm-host"))
embeddableTestRuntime(project(":kotlin-test:kotlin-test-jvm"))
embeddableTestRuntime(project(":kotlin-test:kotlin-test-junit"))
embeddableTestRuntime(projectTests(":compiler:tests-common")) { isTransitive = false }
embeddableTestRuntime(testSourceSet.output)
}
sourceSets {
"main" {}
"test" { projectDefault() }
}
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
}
projectTest(parallel = true) {
dependsOn(":dist")
workingDir = rootDir
systemProperty("kotlin.script.test.base.compiler.arguments", "-Xuse-old-backend")
}
// This doesn;t work now due to conflicts between embeddable compiler contents and intellij sdk modules
// To make it work, the dependencies to the intellij sdk should be eliminated
//projectTest(taskName = "embeddableTest", parallel = true) {
// workingDir = rootDir
// dependsOn(embeddableTestRuntime)
// classpath = embeddableTestRuntime
//}
projectTest(taskName = "testWithIr", parallel = true) {
dependsOn(":dist")
workingDir = rootDir
systemProperty("kotlin.script.base.compiler.arguments", "-Xuse-ir")
}