From 92d52bdda6e3d2bf917bab17ff5aa5f3bf57c785 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Sun, 24 Dec 2023 01:53:21 +0800 Subject: [PATCH] =?UTF-8?q?beta3=20=E4=BA=86=E9=83=BD=EF=BC=8C=E5=A4=A7?= =?UTF-8?q?=E5=93=A5=E4=BD=A0=E5=88=AB=E5=86=8D=E5=87=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildSrc/src/main/kotlin/IProject.kt | 2 +- ...orm.multiplatform-maven-publish.gradle.kts | 39 ++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/IProject.kt b/buildSrc/src/main/kotlin/IProject.kt index 8ca573d..4140797 100644 --- a/buildSrc/src/main/kotlin/IProject.kt +++ b/buildSrc/src/main/kotlin/IProject.kt @@ -9,7 +9,7 @@ object IProject : ProjectDetail() { const val DESCRIPTION = "Generate platform-compatible functions for Kotlin suspend functions" const val HOMEPAGE = "https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin" - override val version: Version = version(0, 6, 0) - version("beta2") + override val version: Version = version(0, 6, 0) - version("beta3") override val homepage: String get() = HOMEPAGE diff --git a/buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts b/buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts index df8446f..5b1af7f 100644 --- a/buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts +++ b/buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts @@ -1,7 +1,7 @@ import love.forte.gradle.common.core.Gpg import love.forte.gradle.common.core.project.setup import love.forte.gradle.common.core.property.systemProp -import love.forte.gradle.common.publication.configure.multiplatformConfigPublishing +import love.forte.gradle.common.publication.configure.* plugins { id("org.jetbrains.dokka") @@ -43,6 +43,43 @@ multiplatformConfigPublishing { } +val config = MavenMultiplatformPublishingConfigExtensions().apply { + project = IProject + val jarJavadoc by tasks.registering(Jar::class) { + group = "documentation" + archiveClassifier.set("javadoc") + } + artifact(jarJavadoc) + isSnapshot = project.version.toString().contains("SNAPSHOT", true) + releasesRepository = ReleaseRepository + snapshotRepository = SnapshotRepository + gpg = Gpg.ofSystemPropOrNull() + + if (systemProp("SIMBOT_LOCAL").toBoolean()) { + logger.info("Is 'SIMBOT_LOCAL', mainHost set as null") + mainHost = null + } + + mainHostSupportedTargets += setOf("wasm_js") +} + +publishing { + commonConfigPublishingRepositories(config) + publications { + withType { + commonConfigMavenPublication(project, config) + } + } + commonPublicationSignConfig(config) + + if (config.mainHost != null) { + + } +} + + + + // TODO see https://github.com/gradle-nexus/publish-plugin/issues/208#issuecomment-1465029831 val signingTasks: TaskCollection = tasks.withType() tasks.withType().configureEach {