Skip to content

Commit

Permalink
fix: publish service poms with sdkId (#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
aajtodd authored Sep 18, 2023
1 parent 374e060 commit 7b5747a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions services/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
*/
import aws.sdk.kotlin.gradle.dsl.configurePublishing
import aws.sdk.kotlin.gradle.kmp.*
import aws.sdk.kotlin.gradle.util.typedProp
import java.time.LocalDateTime

plugins {
id("org.jetbrains.dokka")
`maven-publish`
}

val sdkVersion: String by project
Expand Down Expand Up @@ -122,4 +124,13 @@ subprojects {
}

configurePublishing("aws-sdk-kotlin")
publishing {
publications.all {
if (this !is MavenPublication) return@all
project.afterEvaluate {
val sdkId = project.typedProp<String>("aws.sdk.id") ?: error("service build `${project.name}` is missing `aws.sdk.id` property required for publishing")
pom.properties.put("aws.sdk.id", sdkId)
}
}
}
}

0 comments on commit 7b5747a

Please sign in to comment.