diff --git a/kotlin/build.gradle.kts b/kotlin/build.gradle.kts index c7b06c369..12008778b 100644 --- a/kotlin/build.gradle.kts +++ b/kotlin/build.gradle.kts @@ -26,17 +26,12 @@ java { kotlin { jvm { compilations { - val main by getting val integrationTest by compilations.creating { // Create a test task to run the tests produced by this compilation: tasks.register("integrationTest") { description = "Run the integration tests" group = "verification" - // Run the tests with the classpath containing the compile dependencies (including 'main'), - // runtime dependencies, and the outputs of this compilation: classpath = compileDependencyFiles + runtimeDependencyFiles + output.allOutputs - - // Run only the tests from this compilation's outputs: testClassesDirs = output.classesDirs testLogging { @@ -44,6 +39,8 @@ kotlin { } } } + val test by compilations.getting + integrationTest.associateWith(test) } } js(IR) { @@ -108,16 +105,17 @@ kotlin { } val commonTest by getting - val jvmTest by getting + val jvmTest by getting { + dependencies { + implementation(libs.kotest.junit5) + } + } val linuxX64Test by getting val macosX64Test by getting val mingwX64Test by getting val jvmIntegrationTest by getting { - dependsOn(jvmMain) - dependsOn(jvmTest) dependencies { - implementation(libs.kotest.junit5) implementation(libs.kotest.testcontainers) implementation(libs.testcontainers.postgresql) }