From 3c3657969f7c2ea3b69b76b7aa5775459a7d16ed Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Wed, 22 Jun 2022 17:02:23 +0800 Subject: [PATCH] skip publication setup for `mirai-console-gradle` --- buildSrc/src/main/kotlin/JvmPublishing.kt | 3 +++ mirai-console/tools/gradle-plugin/build.gradle.kts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/JvmPublishing.kt b/buildSrc/src/main/kotlin/JvmPublishing.kt index 9451e4d25..a3a3fb0f6 100644 --- a/buildSrc/src/main/kotlin/JvmPublishing.kt +++ b/buildSrc/src/main/kotlin/JvmPublishing.kt @@ -75,9 +75,12 @@ inline fun Project.configurePublishing( vcs: String = "https://github.com/mamoe/mirai", addProjectComponents: Boolean = true, setupGpg: Boolean = true, + skipPublicationSetup: Boolean = false, ) { configureRemoteRepos() + if (skipPublicationSetup) return + val shadowJar = if (!addProjectComponents) null else tasks.register("shadowJar") { archiveClassifier.set("all") manifest.inheritFrom(tasks.getByName("jar").manifest) diff --git a/mirai-console/tools/gradle-plugin/build.gradle.kts b/mirai-console/tools/gradle-plugin/build.gradle.kts index 4dceb28a2..65445c400 100644 --- a/mirai-console/tools/gradle-plugin/build.gradle.kts +++ b/mirai-console/tools/gradle-plugin/build.gradle.kts @@ -119,5 +119,5 @@ tasks { } if (System.getenv("MIRAI_IS_SNAPSHOTS_PUBLISHING")?.toBoolean() == true) { - configurePublishing("mirai-console-gradle") + configurePublishing("mirai-console-gradle", skipPublicationSetup = true) } \ No newline at end of file