diff --git a/kotlin-native/backend.native/tests/samples/curl/build.gradle.kts b/kotlin-native/backend.native/tests/samples/curl/build.gradle.kts index f3ea5d66da9..1ed5939addb 100644 --- a/kotlin-native/backend.native/tests/samples/curl/build.gradle.kts +++ b/kotlin-native/backend.native/tests/samples/curl/build.gradle.kts @@ -2,12 +2,6 @@ plugins { kotlin("multiplatform") } -val localRepo = rootProject.file("build/.m2-local") - -repositories { - maven("file://$localRepo") -} - //val mingwPath = File(System.getenv("MINGW64_DIR") ?: "C:/msys64/mingw64") val mingwPath = File("C:/msys64/mingw64") // use only preinstalled verions from this path, otherwise fail with linkage errors @@ -41,38 +35,8 @@ kotlin { sourceSets { val curlMain by getting { dependencies { - implementation("org.jetbrains.kotlin.sample.native:libcurl:1.0") + implementation(project(":libcurl")) } } } - - // The code 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") - } - } - - tasks.withType { - dependsOn(":libcurl:publish") - } -} - -// The following snippet is needed to give instructions for IDEA user who just imported project -// and sees "Could not resolve..." message in IDEA console. -gradle.buildFinished { - val configurationName = kotlin.targets["curl"].compilations["main"].compileDependencyConfigurationName - val configuration = project.configurations[configurationName] - if (configuration.isCanBeResolved && configuration.state == Configuration.State.RESOLVED_WITH_FAILURES) { - println( - """ - | - |IMPORTANT: - |The message about unresolved "libcurl" dependency likely means that "libcurl" has not been built and published to local Maven repo yet. - |Please run "publish" task for "libcurl" sub-project and re-import Kotlin/Native samples in IDEA. - """.trimMargin() - ) - } } diff --git a/kotlin-native/backend.native/tests/samples/libcurl/build.gradle.kts b/kotlin-native/backend.native/tests/samples/libcurl/build.gradle.kts index d5cfc120ede..b846d8f3c8d 100644 --- a/kotlin-native/backend.native/tests/samples/libcurl/build.gradle.kts +++ b/kotlin-native/backend.native/tests/samples/libcurl/build.gradle.kts @@ -1,21 +1,5 @@ plugins { kotlin("multiplatform") - `maven-publish` -} - -group = "org.jetbrains.kotlin.sample.native" -version = "1.0" - -val localRepo = rootProject.file("build/.m2-local") - -publishing { - repositories { - maven("file://$localRepo") - } -} - -val cleanLocalRepo by tasks.creating(Delete::class) { - delete(localRepo) } val mingwPath = File(System.getenv("MINGW64_DIR") ?: "C:/msys64/mingw64") @@ -43,16 +27,6 @@ kotlin { } } } - - mavenPublication { - pom { - withXml { - val root = asNode() - root.appendNode("name", "libcurl interop library") - root.appendNode("description", "A library providing interoperability with host libcurl") - } - } - } } // Enable experimental stdlib API used by the sample.