Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions build-plugins/build-support/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ repositories {
}

dependencies {
implementation(libs.nexus.publish.plugin)
implementation(libs.jreleaser.plugin)
compileOnly(gradleApi())
implementation(libs.aws.sdk.s3)
implementation(libs.aws.sdk.cloudwatch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ abstract class SonatypeCentralPortalPublishTask : DefaultTask() {
// 3) Evaluate
when (result.deploymentState) {
"PUBLISHING" -> logger.lifecycle("✅ Bundle validated by Maven Central")

"FAILED" -> {
val reasons = result.errors?.values?.joinToString("\n- ", prefix = "\n- ")
?: "\n(no error details returned)"
throw RuntimeException("❌ Sonatype deployment FAILED for ${result.deploymentId}$reasons")
}

else -> error("Unexpected terminal state: ${result.deploymentState}")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ abstract class SonatypeCentralPortalWaitForPublicationTask : DefaultTask() {
"PUBLISHED" -> {
logger.lifecycle("🚀 Deployment PUBLISHED (deploymentId=$deploymentId)")
}

"FAILED" -> {
val reasons = result.errors?.values?.joinToString("\n- ", prefix = "\n- ") ?: "\n(no error details returned)"
throw RuntimeException("❌ Sonatype publication FAILED for $deploymentId$reasons")
}

else -> error("Unexpected terminal state: ${result.deploymentState}")
}
}
Expand Down
18 changes: 7 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
[versions]
aws-sdk-version = "1.5.26"
kotlin-version = "2.2.0"
ktlint-version = "1.3.0"
nexus-plugin-version = "2.0.0"
jreleaser-plugin-version = "1.18.0"
publish-plugin-version = "1.3.1"
smithy-version = "1.60.2"
aws-sdk-version = "1.5.105" #TODO Bump to 1.6.0 once released
kotlin-version = "2.3.0"
ktlint-version = "1.8.0"
publish-plugin-version = "2.0.0"
smithy-version = "1.65.0"
smithy-gradle-plugin-version = "1.3.0"
junit-version = "5.10.1"
junit-version = "6.0.1"
coroutines-version = "1.10.2"
slf4j-version = "2.0.17"
okhttp-version = "5.1.0"
okhttp-version = "5.3.2"
kotlinx-serialization-version = "1.9.0"

[libraries]
Expand All @@ -19,8 +17,6 @@ aws-sdk-s3 = { module = "aws.sdk.kotlin:s3", version.ref = "aws-sdk-version" }
ktlint-cli = { module = "com.pinterest.ktlint:ktlint-cli", version.ref = "ktlint-version" }
ktlint-cli-ruleset-core = { module = "com.pinterest.ktlint:ktlint-cli-ruleset-core", version.ref = "ktlint-version" }
ktlint-rule-engine = { module = "com.pinterest.ktlint:ktlint-rule-engine", version.ref = "ktlint-version" }
nexus-publish-plugin = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexus-plugin-version" }
jreleaser-plugin = { module = "org.jreleaser:jreleaser-gradle-plugin", version.ref = "jreleaser-plugin-version" }
smithy-model = { module = "software.amazon.smithy:smithy-model", version.ref = "smithy-version" }
smithy-gradle-base-plugin = { module = "software.amazon.smithy.gradle:smithy-base", version.ref = "smithy-gradle-plugin-version" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-version" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ import java.util.Properties
/**
* Matches @PlannedRemoval with either named args (major=x, minor=y) or positional args (x, y)
*/
internal fun plannedRemovalRegex(major: Int, minor: Int): Regex =
Regex(
"""@PlannedRemoval\s*\(\s*(?:major\s*=\s*$major\s*,\s*minor\s*=\s*$minor\s*|\s*$major\s*,\s*$minor\s*)\s*\)""",
)
internal fun plannedRemovalRegex(major: Int, minor: Int): Regex = Regex(
"""@PlannedRemoval\s*\(\s*(?:major\s*=\s*$major\s*,\s*minor\s*=\s*$minor\s*|\s*$major\s*,\s*$minor\s*)\s*\)""",
)

/**
* Creates a ktlint rule that detects APIs annotated with @PlannedRemoval for the upcoming minor version.
Expand Down
Loading