diff --git a/hll/build.gradle.kts b/hll/build.gradle.kts index ddd1bdcee90..0efc2348f62 100644 --- a/hll/build.gradle.kts +++ b/hll/build.gradle.kts @@ -5,8 +5,6 @@ import aws.sdk.kotlin.gradle.dsl.configurePublishing import aws.sdk.kotlin.gradle.kmp.* -import aws.smithy.kotlin.runtime.InternalApi -import aws.smithy.kotlin.runtime.text.ensureSuffix import org.jetbrains.kotlin.gradle.dsl.JvmTarget description = "High-level libraries for the AWS SDK for Kotlin" @@ -34,7 +32,8 @@ val optinAnnotations = listOf( "kotlin.RequiresOptIn", ) -@OptIn(InternalApi::class) +private fun String.ensureSuffix(suffix: String): String = if (endsWith(suffix)) this else plus(suffix) + val hllPreviewVersion = if (sdkVersion.contains("-SNAPSHOT")) { // e.g. 1.3.29-beta-SNAPSHOT sdkVersion .removeSuffix("-SNAPSHOT") diff --git a/hll/dynamodb-mapper/dynamodb-mapper-schema-generator-plugin/build.gradle.kts b/hll/dynamodb-mapper/dynamodb-mapper-schema-generator-plugin/build.gradle.kts index e8ea582c245..74d16d4f439 100644 --- a/hll/dynamodb-mapper/dynamodb-mapper-schema-generator-plugin/build.gradle.kts +++ b/hll/dynamodb-mapper/dynamodb-mapper-schema-generator-plugin/build.gradle.kts @@ -1,5 +1,3 @@ -import aws.smithy.kotlin.runtime.InternalApi -import aws.smithy.kotlin.runtime.text.ensureSuffix import org.jetbrains.kotlin.gradle.tasks.KotlinCompile /* @@ -90,7 +88,8 @@ tasks.test { // FIXME Commonize the following functions into the aws-kotlin-repo-tools build-support val sdkVersion: String by project -@OptIn(InternalApi::class) +private fun String.ensureSuffix(suffix: String): String = if (endsWith(suffix)) this else plus(suffix) + val hllPreviewVersion = if (sdkVersion.contains("-SNAPSHOT")) { // e.g. 1.3.29-beta-SNAPSHOT sdkVersion .removeSuffix("-SNAPSHOT")