57 lines
2.2 KiB
Kotlin
57 lines
2.2 KiB
Kotlin
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
apply { plugin("kotlin") }
|
|
|
|
dependencies {
|
|
val compile by configurations
|
|
val compileOnly by configurations
|
|
val testCompile by configurations
|
|
val testCompileOnly by configurations
|
|
val testRuntime by configurations
|
|
testCompile(commonDep("junit:junit"))
|
|
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
|
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
|
testCompile(project(":compiler.tests-common"))
|
|
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(project(":kotlin-stdlib"))
|
|
testCompile(project(":kotlin-script-runtime"))
|
|
testCompile(project(":kotlin-runtime"))
|
|
testCompile(project(":kotlin-reflect"))
|
|
testCompile(projectTests(":compiler"))
|
|
testRuntime(project(":compiler:preloader"))
|
|
testRuntime(ideaSdkCoreDeps("*.jar"))
|
|
testRuntime(ideaSdkDeps("*.jar"))
|
|
}
|
|
|
|
configureKotlinProjectSources()
|
|
configureKotlinProjectTestsDefault()
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
kotlinOptions.jdkHome = rootProject.extra["JDK_18"]!!.toString()
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
}
|
|
|
|
testsJar {}
|
|
|
|
tasks.withType<Test> {
|
|
executable = "${rootProject.extra["JDK_18"]!!}/bin/java"
|
|
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
|
dependsOn(":prepare:mock-runtime-for-test:dist")
|
|
workingDir = rootDir
|
|
systemProperty("idea.is.unit.test", "true")
|
|
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
|
systemProperty("kotlin.test.script.classpath", the<JavaPluginConvention>().sourceSets.getByName("test").output.classesDirs.joinToString(File.pathSeparator))
|
|
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
|
|
maxHeapSize = "1200m"
|
|
ignoreFailures = true
|
|
}
|
|
|