From 8df651bead476f4c6092f0caa9598cd6b5d16398 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 24 Aug 2022 18:53:21 +0300 Subject: [PATCH] Warn on native plugin usage --- src/main/kotlin/space/kscience/gradle/KScienceNativePlugin.kt | 2 +- src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/space/kscience/gradle/KScienceNativePlugin.kt b/src/main/kotlin/space/kscience/gradle/KScienceNativePlugin.kt index 232e653..a41fbf6 100644 --- a/src/main/kotlin/space/kscience/gradle/KScienceNativePlugin.kt +++ b/src/main/kotlin/space/kscience/gradle/KScienceNativePlugin.kt @@ -19,7 +19,7 @@ public class KScienceNativePlugin : Plugin { if (!plugins.hasPlugin(KScienceCommonPlugin::class)) { configureKScience() } else { - error("KScience native plugin must be applied instead of common") + project.logger.warn("Use `kscience.native()` configuration block") } } } diff --git a/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt b/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt index a1fa72a..676c9f5 100644 --- a/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt +++ b/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt @@ -96,7 +96,7 @@ public class KSciencePublishingExtension(public val project: Project) { public fun sonatype( addToRelease: Boolean = (project.requestPropertyOrNull("publishing.sonatype") != "false"), ) { - require(isVcsInitialized) { "The project vcs is not set up use 'git' method to do so" } + require(isVcsInitialized) { "The project vcs is not set up use 'pom' method to do so" } project.addSonatypePublishing() if (addToRelease) repositoryNames += "sonatype"