diff --git a/.github/workflows/minor-version-bump.yml b/.github/workflows/minor-version-bump.yml new file mode 100644 index 000000000..336cb5128 --- /dev/null +++ b/.github/workflows/minor-version-bump.yml @@ -0,0 +1,12 @@ +name: Minor version bump check +on: + pull_request: + +jobs: + minor-version-bump-check: + if: github.head_ref == '^v\d+\.\d+.*$' # Only runs on branches starting with vX.X (e.g., v1.2, v1.2.3, v1.2-main) + permissions: {} + runs-on: ubuntu-latest + steps: + - name: Minor version bump check + uses: awslabs/aws-kotlin-repo-tools/.github/actions/minor-version-bump@main diff --git a/build.gradle.kts b/build.gradle.kts index 2a900f2cd..951d4fdeb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,6 +4,7 @@ */ import aws.sdk.kotlin.gradle.dsl.configureJReleaser import aws.sdk.kotlin.gradle.dsl.configureLinting +import aws.sdk.kotlin.gradle.dsl.configureMinorVersionStrategyRules import aws.sdk.kotlin.gradle.util.typedProp import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -109,6 +110,7 @@ val lintPaths = listOf( ) configureLinting(lintPaths) +configureMinorVersionStrategyRules(lintPaths) // Binary compatibility apiValidation { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 40a133839..92c7aff40 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ kotlin-version = "2.2.0" dokka-version = "2.0.0" -aws-kotlin-repo-tools-version = "0.4.50" +aws-kotlin-repo-tools-version = "0.4.52" # libs coroutines-version = "1.10.2" diff --git a/runtime/runtime-core/api/runtime-core.api b/runtime/runtime-core/api/runtime-core.api index fcc7f6727..1db1d1066 100644 --- a/runtime/runtime-core/api/runtime-core.api +++ b/runtime/runtime-core/api/runtime-core.api @@ -15,6 +15,11 @@ public class aws/smithy/kotlin/runtime/ClientException : aws/smithy/kotlin/runti public fun (Ljava/lang/Throwable;)V } +public abstract interface annotation class aws/smithy/kotlin/runtime/DeprecatedUntilVersion : java/lang/annotation/Annotation { + public abstract fun major ()I + public abstract fun minor ()I +} + public class aws/smithy/kotlin/runtime/ErrorMetadata { public static final field Companion Laws/smithy/kotlin/runtime/ErrorMetadata$Companion; public fun ()V diff --git a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt index ee3ab01e2..d0b474e9e 100644 --- a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt +++ b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt @@ -58,3 +58,8 @@ public annotation class ExperimentalApi */ @DslMarker public annotation class SdkDsl + +public annotation class DeprecatedUntilVersion( + val major: Int, + val minor: Int, +) \ No newline at end of file diff --git a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/smoketests/SmokeTestsFunctions.kt b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/smoketests/SmokeTestsFunctions.kt index 8044dc620..13956b045 100644 --- a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/smoketests/SmokeTestsFunctions.kt +++ b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/smoketests/SmokeTestsFunctions.kt @@ -5,8 +5,11 @@ package aws.smithy.kotlin.runtime.smoketests +import aws.smithy.kotlin.runtime.DeprecatedUntilVersion + public expect fun exitProcess(status: Int): Nothing +@DeprecatedUntilVersion(1, 6) public class SmokeTestsException(message: String) : Exception(message) /**