Include all jvm stdlib tests into kotlin-stdlib project test

JVM stdlib tests are compiled against JDK 8 so there's no need to divide them by modules anymore

#KT-51907
This commit is contained in:
Ilya Gorbunov
2023-01-20 05:07:44 +01:00
committed by Space Team
parent 72ced53833
commit 8b68234528
3 changed files with 14 additions and 52 deletions
-29
View File
@@ -19,13 +19,6 @@ sourceSets {
}
test {
kotlin {
srcDir 'test'
if(!BuildPropertiesKt.getKotlinBuildProperties(project).inIdeaSync) {
srcDir '../jvm/test'
srcDir '../common/test'
srcDir '../test'
srcDir '../jdk7/test'
}
}
}
java9 {
@@ -89,28 +82,6 @@ configureFrontendIr(project)
LibrariesCommon.configureJava9Compilation(project, 'kotlin.stdlib.jdk8')
task testJdk6Tests(type: Test) { thisTask ->
dependsOn(':kotlin-stdlib:testClasses')
check.dependsOn(thisTask)
group = "verification"
def kotlinStdLibTestOutput = project(':kotlin-stdlib').sourceSets.test.output
def objectFactory = project.objects
doFirst {
testClassesDirs = kotlinStdLibTestOutput
classpath = objectFactory.fileCollection().from(
testClassesDirs,
sourceSets.test.compileClasspath
)
}
}
[JdkMajorVersion.JDK_9_0, JdkMajorVersion.JDK_10_0, JdkMajorVersion.JDK_11_0].forEach { jvmVersion ->
check.dependsOn(tasks.register("jdk${jvmVersion.majorVersion}Test", Test) { thisTask ->
group = "verification"
thisTask.javaLauncher.set(JvmToolchain.getToolchainLauncherFor(project, jvmVersion))
})
}
tasks.named("compileModuleTestJava", JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9