Skip to content

Commit

Permalink
Expand allow-list, only apply signing plugin when required, add proje…
Browse files Browse the repository at this point in the history
…ct group ID to log message
  • Loading branch information
lauzadis committed Sep 25, 2024
1 parent c09b6ce commit efa4e0b
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ private val ALLOWED_PUBLICATIONS = listOf(
"android", // aws-crt-kotlin
"codegen",
"codegen-testutils",

// aws-sdk-kotlin:hll
"hll-codegen",
"dynamodb-mapper-codegen",
"dynamodb-mapper-schema-generator-plugin",
"dynamodb-mapper-schema-codegen",
"pluginMaven",
"dynamodb-mapper-schema-generatorPluginMarkerMaven"
)

/**
Expand All @@ -51,7 +59,6 @@ fun Project.skipPublishing() {
fun Project.configurePublishing(repoName: String) {
val project = this
apply(plugin = "maven-publish")
apply(plugin = "signing")

// FIXME: create a real "javadoc" JAR from Dokka output
val javadocJar = tasks.register<Jar>("emptyJar") {
Expand Down Expand Up @@ -99,6 +106,7 @@ fun Project.configurePublishing(repoName: String) {
}

if (project.hasProperty(SIGNING_KEY_PROP) && project.hasProperty(SIGNING_PASSWORD_PROP)) {
apply(plugin = "signing")
extensions.configure<SigningExtension> {
useInMemoryPgpKeys(
project.property(SIGNING_KEY_PROP) as String,
Expand All @@ -119,7 +127,7 @@ fun Project.configurePublishing(repoName: String) {
onlyIf {
isAvailableForPublication(project, publication).also {
if (!it) {
logger.warn("Skipping publication, project=${project.name}; publication=${publication.name}")
logger.warn("Skipping publication, project=${project.name}; publication=${publication.name}; group=${publication.groupId}")
}
}
}
Expand Down

0 comments on commit efa4e0b

Please sign in to comment.