diff --git a/buildSrc/src/main/kotlin/IProject.kt b/buildSrc/src/main/kotlin/IProject.kt index 2eca404..82a838e 100644 --- a/buildSrc/src/main/kotlin/IProject.kt +++ b/buildSrc/src/main/kotlin/IProject.kt @@ -1,3 +1,4 @@ +import IProject.IS_SNAPSHOT import love.forte.gradle.common.core.project.ProjectDetail import love.forte.gradle.common.core.project.Version import love.forte.gradle.common.core.project.minus @@ -5,6 +6,7 @@ import love.forte.gradle.common.core.project.version import org.gradle.api.Project object IProject : ProjectDetail() { + const val IS_SNAPSHOT = false const val GROUP = "love.forte.plugin.suspend-transform" const val DESCRIPTION = "Generate platform-compatible functions for Kotlin suspend functions" @@ -47,5 +49,6 @@ object IProject : ProjectDetail() { fun Project.setupWith(ktVersion: String) { group = IProject.GROUP description = IProject.DESCRIPTION - version = ktVersion + "-" + IProject.pluginVersion.toString() + val mergedVersion = ktVersion + "-" + IProject.pluginVersion.toString() + version = if (IS_SNAPSHOT) "$mergedVersion-SNAPSHOT" else mergedVersion } diff --git a/plugins/suspend-transform-plugin-gradle/build.gradle.kts b/plugins/suspend-transform-plugin-gradle/build.gradle.kts index 98fe5ba..2efccde 100644 --- a/plugins/suspend-transform-plugin-gradle/build.gradle.kts +++ b/plugins/suspend-transform-plugin-gradle/build.gradle.kts @@ -1,7 +1,7 @@ import love.forte.gradle.common.core.Gpg -import love.forte.gradle.common.core.property.of import love.forte.gradle.common.publication.configure.configPublishMaven import love.forte.gradle.common.publication.configure.publishingExtension +import love.forte.gradle.common.publication.configure.setupPom import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import utils.isMainPublishable @@ -85,7 +85,6 @@ tasks.withType { } } -val gpgValue = Gpg.ofSystemPropOrNull() if (isMainPublishable()) { publishing { repositories { @@ -103,12 +102,14 @@ if (isMainPublishable()) { // } withType { - pom { - name of project.name - group = project.group - description of project.description - version = project.version.toString() - } + + setupPom(project.name, IProject) +// pom { +// name of project.name +// group = project.group +// description of project.description +// version = project.version.toString() +// } // setupPom(project.name, IProject) } } @@ -121,6 +122,7 @@ if (isMainPublishable()) { signing { + val gpgValue = Gpg.ofSystemPropOrNull() isRequired = gpgValue != null if (gpgValue != null) { val (keyId, secretKey, password) = gpgValue