Continue switching projects to improved dsl: sourceSets and test running

This commit is contained in:
Ilya Chernikov
2017-08-21 20:53:48 +02:00
parent 336e24b837
commit deda50dbbb
76 changed files with 372 additions and 614 deletions
+5 -13
View File
@@ -3,11 +3,6 @@ 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"))
@@ -31,8 +26,10 @@ dependencies {
testRuntime(ideaSdkDeps("*.jar"))
}
configureKotlinProjectSources()
configureKotlinProjectTestsDefault()
sourceSets {
"main" {}
"test" { projectDefault() }
}
tasks.withType<KotlinCompile> {
kotlinOptions.jdkHome = rootProject.extra["JDK_18"]!!.toString()
@@ -41,16 +38,11 @@ tasks.withType<KotlinCompile> {
testsJar {}
tasks.withType<Test> {
projectTest {
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
}