Skip to content

Commit 676424d

Browse files
committed
fix: maven release
1 parent ca87c2b commit 676424d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.gradle.plugins.signing.Sign
2+
13
plugins {
24
kotlin("multiplatform") version "2.0.21"
35
kotlin("plugin.serialization") version "2.0.21"
@@ -178,6 +180,15 @@ tasks.clean {
178180
delete("bin")
179181
}
180182

183+
// Disable signing tasks when credentials are not available
184+
val signingKey = System.getenv("SIGN_KEY")
185+
val signingPassword = System.getenv("SIGN_KEY_PASS")
186+
if (signingKey.isNullOrBlank() || signingPassword.isNullOrBlank()) {
187+
tasks.withType<Sign>().configureEach {
188+
enabled = false
189+
}
190+
}
191+
181192
// generateJavaGrammarSource must run before jvmProcessResources
182193
tasks.named("jvmProcessResources") { dependsOn(generateJavaGrammarSource) }
183194
tasks.named("compileKotlinJvm") { dependsOn(generateJavaGrammarSource) }

0 commit comments

Comments
 (0)