Continue switching projects to improved dsl: sourceSets and test running
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user