Skip to content

Commit f78966e

Browse files
RBusarowkodiakhq[bot]
authored andcommitted
don't sign -SNAPSHOT builds
1 parent da64473 commit f78966e

File tree

1 file changed

+12
-0
lines changed
  • build-logic/mcbuild/src/main/kotlin/modulecheck/builds

1 file changed

+12
-0
lines changed

build-logic/mcbuild/src/main/kotlin/modulecheck/builds/publishing.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import org.gradle.api.tasks.bundling.Jar
3030
import org.gradle.kotlin.dsl.apply
3131
import org.gradle.kotlin.dsl.configure
3232
import org.gradle.plugins.signing.Sign
33+
import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask
3334

3435
const val GROUP = "com.rickbusarow.modulecheck"
3536
const val PLUGIN_ID = "com.rickbusarow.module-check"
@@ -114,5 +115,16 @@ fun Project.configurePublishing(
114115
}
115116
tasks.withType(Sign::class.java).configureEach {
116117
notCompatibleWithConfigurationCache("")
118+
// skip signing for -LOCAL and -SNAPSHOT publishing
119+
onlyIf {
120+
121+
!VERSION_NAME.endsWith("SNAPSHOT") && !VERSION_NAME.endsWith("LOCAL")
122+
}
123+
}
124+
tasks.withType(AbstractDokkaLeafTask::class.java) {
125+
// skip signing for -LOCAL publishing
126+
onlyIf {
127+
!VERSION_NAME.endsWith("LOCAL")
128+
}
117129
}
118130
}

0 commit comments

Comments
 (0)