Make signing optional

This commit is contained in:
Alexander Nozik 2023-02-03 13:12:10 +03:00
parent b4fb5c515a
commit 99e3e1ea85
2 changed files with 17 additions and 12 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- MPP does not use JVM and JS(IR) targets anymore. They could be turned manually via `js()`, `jvm()` or `fullStack()`
- Signing is not applied if signingId is not provided
### Deprecated

View File

@ -89,6 +89,7 @@ internal fun Project.setupPublication(mavenPomConfiguration: MavenPom.() -> Unit
}
}
if (requestPropertyOrNull("publishing.signing.id") != null || requestPropertyOrNull("signing.gnupg.keyName") != null) {
if (!plugins.hasPlugin("signing")) {
apply<SigningPlugin>()
@ -102,9 +103,12 @@ internal fun Project.setupPublication(mavenPomConfiguration: MavenPom.() -> Unit
// if key is provided, use it
useInMemoryPgpKeys(signingId, signingKey, signingPassphrase)
} // else use file signing
} // else use agent signing
sign(publications)
}
} else {
logger.warn("Signing information is not provided. Skipping artefact signing.")
}
}
}
}