Files
kotlin-fork/compiler/tests-java8/build.gradle.kts
T
Ilya Gorbunov 61b78d7eda Make projectTests type of dependency transitive on testRuntime dependencies
`tests-jar` configuration now extends testRuntime instead of testCompile
(note that testRuntime extends testCompile),
and projectTests() dependency shortcut makes it transitive.

This is required to depend on test utility modules producing `-tests` jar instead of default one
without listing all their transitive dependencies.
2017-11-02 18:19:52 +03:00

49 lines
1.8 KiB
Kotlin

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
apply { plugin("kotlin") }
dependencies {
testCompile(commonDep("junit:junit"))
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
testCompile(projectDist(":kotlin-test:kotlin-test-junit"))
testCompile(project(":core"))
testCompile(project(":compiler:util"))
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:frontend"))
testCompile(project(":compiler:frontend.java"))
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:serialization"))
testCompile(ideaSdkDeps("openapi", "idea", "util", "asm-all"))
// deps below are test runtime deps, but made test compile to split compilation and running to reduce mem req
testCompile(projectDist(":kotlin-stdlib"))
testCompile(projectDist(":kotlin-script-runtime"))
testCompile(projectDist(":kotlin-reflect"))
testCompile(projectTests(":compiler"))
testCompile(projectTests(":compiler:tests-common"))
testRuntime(projectRuntimeJar(":kotlin-preloader"))
testRuntime(preloadedDeps("dx", subdir = "android-5.0/lib"))
testRuntime(ideaSdkCoreDeps("*.jar"))
testRuntime(ideaSdkDeps("*.jar"))
}
sourceSets {
"main" {}
"test" { projectDefault() }
}
tasks.withType<KotlinCompile> {
kotlinOptions.jdkHome = rootProject.extra["JDK_18"]!!.toString()
kotlinOptions.jvmTarget = "1.8"
}
testsJar {}
projectTest {
executable = "${rootProject.extra["JDK_18"]!!}/bin/java"
dependsOnTaskIfExistsRec("dist", project = rootProject)
dependsOn(":prepare:mock-runtime-for-test:dist")
workingDir = rootDir
systemProperty("kotlin.test.script.classpath", the<JavaPluginConvention>().sourceSets.getByName("test").output.classesDirs.joinToString(File.pathSeparator))
}