Skip to content

Commit d276a08

Browse files
authored
fix: remove use of smithy-kotlin ensureSuffix (#1613)
1 parent 31e0ac9 commit d276a08

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

hll/build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
import aws.sdk.kotlin.gradle.dsl.configurePublishing
77
import aws.sdk.kotlin.gradle.kmp.*
8-
import aws.smithy.kotlin.runtime.InternalApi
9-
import aws.smithy.kotlin.runtime.text.ensureSuffix
108
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
119

1210
description = "High-level libraries for the AWS SDK for Kotlin"
@@ -34,7 +32,8 @@ val optinAnnotations = listOf(
3432
"kotlin.RequiresOptIn",
3533
)
3634

37-
@OptIn(InternalApi::class)
35+
private fun String.ensureSuffix(suffix: String): String = if (endsWith(suffix)) this else plus(suffix)
36+
3837
val hllPreviewVersion = if (sdkVersion.contains("-SNAPSHOT")) { // e.g. 1.3.29-beta-SNAPSHOT
3938
sdkVersion
4039
.removeSuffix("-SNAPSHOT")

hll/dynamodb-mapper/dynamodb-mapper-schema-generator-plugin/build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import aws.smithy.kotlin.runtime.InternalApi
2-
import aws.smithy.kotlin.runtime.text.ensureSuffix
31
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
42

53
/*
@@ -90,7 +88,8 @@ tasks.test {
9088
// FIXME Commonize the following functions into the aws-kotlin-repo-tools build-support
9189
val sdkVersion: String by project
9290

93-
@OptIn(InternalApi::class)
91+
private fun String.ensureSuffix(suffix: String): String = if (endsWith(suffix)) this else plus(suffix)
92+
9493
val hllPreviewVersion = if (sdkVersion.contains("-SNAPSHOT")) { // e.g. 1.3.29-beta-SNAPSHOT
9594
sdkVersion
9695
.removeSuffix("-SNAPSHOT")

0 commit comments

Comments
 (0)