Skip to content

Commit 7b5747a

Browse files
authored
fix: publish service poms with sdkId (#1047)
1 parent 374e060 commit 7b5747a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

services/build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
*/
55
import aws.sdk.kotlin.gradle.dsl.configurePublishing
66
import aws.sdk.kotlin.gradle.kmp.*
7+
import aws.sdk.kotlin.gradle.util.typedProp
78
import java.time.LocalDateTime
89

910
plugins {
1011
id("org.jetbrains.dokka")
12+
`maven-publish`
1113
}
1214

1315
val sdkVersion: String by project
@@ -122,4 +124,13 @@ subprojects {
122124
}
123125

124126
configurePublishing("aws-sdk-kotlin")
127+
publishing {
128+
publications.all {
129+
if (this !is MavenPublication) return@all
130+
project.afterEvaluate {
131+
val sdkId = project.typedProp<String>("aws.sdk.id") ?: error("service build `${project.name}` is missing `aws.sdk.id` property required for publishing")
132+
pom.properties.put("aws.sdk.id", sdkId)
133+
}
134+
}
135+
}
125136
}

0 commit comments

Comments
 (0)