From 4b3a5ad8752c9687c167bd35fe6c714091405042 Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Wed, 6 Apr 2022 16:09:27 +0300 Subject: [PATCH] [K/N][samples] Use compilations for libcurl dependency setting --- kotlin-native/samples/curl/build.gradle.kts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/kotlin-native/samples/curl/build.gradle.kts b/kotlin-native/samples/curl/build.gradle.kts index aeb26f73f18..0d490deae05 100644 --- a/kotlin-native/samples/curl/build.gradle.kts +++ b/kotlin-native/samples/curl/build.gradle.kts @@ -44,13 +44,15 @@ kotlin { } } } -} -// The code snippet below is needed to make all compile tasks depend on publication of -// "libcurl" library. So that to the time of compilation the library will already be -// in Maven repo and will be successfully resolved as a dependency of this project. -tasks.withType(AbstractCompile::class) { - dependsOn(":libcurl:publish") + // The code snippet below is needed to make all compile tasks depend on publication of + // "libcurl" library. So that to the time of compilation the library will already be + // in Maven repo and will be successfully resolved as a dependency of this project. + targets.all { + compilations.all { + compileKotlinTask.dependsOn(":libcurl:publish") + } + } } // The following snippet is needed to give instructions for IDEA user who just imported project