Skip to content

Commit 87b1ace

Browse files
authored
fix: add old partitions constructor for backwards compatibility (#1415)
1 parent cd3a1d6 commit 87b1ace

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": "b95f4632-90cf-4d72-8947-46fd13b902c4",
3+
"type": "bugfix",
4+
"description": "Fix backwards incompatibility with versions < 1.2.28"
5+
}

aws-runtime/aws-endpoint/api/aws-endpoint.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public final class aws/sdk/kotlin/runtime/endpoint/functions/PartitionConfig {
4747
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
4848
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
4949
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;)V
50+
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
5051
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)V
5152
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
5253
public final fun component1 ()Ljava/lang/String;

aws-runtime/aws-endpoint/common/src/aws/sdk/kotlin/runtime/endpoint/functions/Functions.kt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,31 @@ public data class Partition(
6262
* the result of a partition call.
6363
*/
6464
@InternalSdkApi
65-
public data class PartitionConfig @JvmOverloads constructor(
65+
public data class PartitionConfig(
6666
public val name: String? = null,
6767
public val dnsSuffix: String? = null,
6868
public val dualStackDnsSuffix: String? = null,
6969
public val supportsFIPS: Boolean? = null,
7070
public val supportsDualStack: Boolean? = null,
7171
public val implicitGlobalRegion: String? = null,
7272
) {
73+
@Deprecated("This constructor does not support implicitGlobalRegion") // but is added for backwards compatibility
74+
@JvmOverloads
75+
public constructor (
76+
name: String? = null,
77+
dnsSuffix: String? = null,
78+
dualStackDnsSuffix: String? = null,
79+
supportsFIPS: Boolean? = null,
80+
supportsDualStack: Boolean? = null,
81+
) : this(
82+
name,
83+
dnsSuffix,
84+
dualStackDnsSuffix,
85+
supportsFIPS,
86+
supportsDualStack,
87+
null,
88+
)
89+
7390
public fun mergeWith(other: PartitionConfig): PartitionConfig =
7491
PartitionConfig(
7592
other.name ?: name,

services/build.gradle.kts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,8 @@ subprojects {
9090

9191
if (project.name == "s3") {
9292
dependencies {
93-
val services = project.parent?.subprojects
94-
95-
if (services?.any { it.name == "s3control" } == true) {
96-
implementation(project(":services:s3control"))
97-
} else {
98-
implementation("aws.sdk.kotlin:s3control:+")
99-
}
100-
101-
if (services?.any { it.name == "sts" } == true) {
102-
implementation(project(":services:sts"))
103-
} else {
104-
implementation("aws.sdk.kotlin:sts:+")
105-
}
93+
implementation(project(":services:s3control"))
94+
implementation(project(":services:sts"))
10695
implementation(libs.smithy.kotlin.aws.signing.crt)
10796
}
10897
}

0 commit comments

Comments
 (0)