Skip to content

Commit ed91742

Browse files
committed
ktlint
1 parent dc9876c commit ed91742

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/publishing/SonatypeCentralPortalPublishTask.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ abstract class SonatypeCentralPortalPublishTask : DefaultTask() {
6868
// 3) Evaluate
6969
when (result.deploymentState) {
7070
"PUBLISHING" -> logger.lifecycle("✅ Bundle validated by Maven Central")
71+
7172
"FAILED" -> {
7273
val reasons = result.errors?.values?.joinToString("\n- ", prefix = "\n- ")
7374
?: "\n(no error details returned)"
7475
throw RuntimeException("❌ Sonatype deployment FAILED for ${result.deploymentId}$reasons")
7576
}
77+
7678
else -> error("Unexpected terminal state: ${result.deploymentState}")
7779
}
7880
}

build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/publishing/SonatypeCentralPortalWaitForPublicationTask.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ abstract class SonatypeCentralPortalWaitForPublicationTask : DefaultTask() {
6161
"PUBLISHED" -> {
6262
logger.lifecycle("🚀 Deployment PUBLISHED (deploymentId=$deploymentId)")
6363
}
64+
6465
"FAILED" -> {
6566
val reasons = result.errors?.values?.joinToString("\n- ", prefix = "\n- ") ?: "\n(no error details returned)"
6667
throw RuntimeException("❌ Sonatype publication FAILED for $deploymentId$reasons")
6768
}
69+
6870
else -> error("Unexpected terminal state: ${result.deploymentState}")
6971
}
7072
}

ktlint/minor-version-rules/src/main/kotlin/software/aws/ktlint/rules/PlannedRemovalRule.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ import java.util.Properties
1515
/**
1616
* Matches @PlannedRemoval with either named args (major=x, minor=y) or positional args (x, y)
1717
*/
18-
internal fun plannedRemovalRegex(major: Int, minor: Int): Regex =
19-
Regex(
20-
"""@PlannedRemoval\s*\(\s*(?:major\s*=\s*$major\s*,\s*minor\s*=\s*$minor\s*|\s*$major\s*,\s*$minor\s*)\s*\)""",
21-
)
18+
internal fun plannedRemovalRegex(major: Int, minor: Int): Regex = Regex(
19+
"""@PlannedRemoval\s*\(\s*(?:major\s*=\s*$major\s*,\s*minor\s*=\s*$minor\s*|\s*$major\s*,\s*$minor\s*)\s*\)""",
20+
)
2221

2322
/**
2423
* Creates a ktlint rule that detects APIs annotated with @PlannedRemoval for the upcoming minor version.

0 commit comments

Comments
 (0)