From 3dcca7448ba0bde3711adae14652417da77b0ac3 Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Thu, 9 Jun 2022 16:19:14 +0300 Subject: [PATCH] Fixed getting a jar file from the classpath --- integration-testing/build.gradle | 13 +++++-------- .../smokeTest}/build.gradle | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) rename {integration-test => integration-testing/smokeTest}/build.gradle (95%) diff --git a/integration-testing/build.gradle b/integration-testing/build.gradle index e112ca758e..b2284abf21 100644 --- a/integration-testing/build.gradle +++ b/integration-testing/build.gradle @@ -71,10 +71,8 @@ task mavenTest(type: Test) { task debugAgentTest(type: Test) { def sourceSet = sourceSets.debugAgentTest - //dependsOn(project(':kotlinx-coroutines-debug').shadowJar) - def debugJar = null - sourceSet.runtimeClasspath.files.forEach {if (it.name.contains("kotlinx-coroutines-debug")) debugJar = it } - jvmArgs ('-javaagent:' + debugJar) + def coroutinesDebugJar = sourceSet.runtimeClasspath.filter {it.name == "kotlinx-coroutines-debug-${coroutines_version}.jar" }.singleFile + jvmArgs ('-javaagent:' + coroutinesDebugJar) testClassesDirs = sourceSet.output.classesDirs classpath = sourceSet.runtimeClasspath systemProperties project.properties.subMap(["overwrite.probes"]) @@ -82,9 +80,8 @@ task debugAgentTest(type: Test) { task coreAgentTest(type: Test) { def sourceSet = sourceSets.coreAgentTest - def coreJar = null - sourceSet.runtimeClasspath.files.forEach {if (it.name.contains("kotlinx-coroutines-core")) coreJar = it } - jvmArgs ('-javaagent:' + coreJar) + def coroutinesCoreJar = sourceSet.runtimeClasspath.filter {it.name == "kotlinx-coroutines-core-jvm-${coroutines_version}.jar" }.singleFile + jvmArgs ('-javaagent:' + coroutinesCoreJar) testClassesDirs = sourceSet.output.classesDirs classpath = sourceSet.runtimeClasspath } @@ -94,5 +91,5 @@ compileTestKotlin { } check { - dependsOn([mavenTest, coreAgentTest, ':smokeTest:build']) + dependsOn([mavenTest, debugAgentTest, coreAgentTest, 'smokeTest:build']) } diff --git a/integration-test/build.gradle b/integration-testing/smokeTest/build.gradle similarity index 95% rename from integration-test/build.gradle rename to integration-testing/smokeTest/build.gradle index 61af410dfa..872da39238 100644 --- a/integration-test/build.gradle +++ b/integration-testing/smokeTest/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'kotlin-multiplatform' + id 'org.jetbrains.kotlin.multiplatform' } repositories { @@ -40,4 +40,4 @@ kotlin { } } } -} +} \ No newline at end of file