Skip to content

Commit

Permalink
fix: add old partitions constructor for backwards compatibility (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
0marperez authored Oct 23, 2024
1 parent cd3a1d6 commit 87b1ace
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changes/b95f4632-90cf-4d72-8947-46fd13b902c4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "b95f4632-90cf-4d72-8947-46fd13b902c4",
"type": "bugfix",
"description": "Fix backwards incompatibility with versions < 1.2.28"
}
1 change: 1 addition & 0 deletions aws-runtime/aws-endpoint/api/aws-endpoint.api
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public final class aws/sdk/kotlin/runtime/endpoint/functions/PartitionConfig {
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)V
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
public final fun component1 ()Ljava/lang/String;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,31 @@ public data class Partition(
* the result of a partition call.
*/
@InternalSdkApi
public data class PartitionConfig @JvmOverloads constructor(
public data class PartitionConfig(
public val name: String? = null,
public val dnsSuffix: String? = null,
public val dualStackDnsSuffix: String? = null,
public val supportsFIPS: Boolean? = null,
public val supportsDualStack: Boolean? = null,
public val implicitGlobalRegion: String? = null,
) {
@Deprecated("This constructor does not support implicitGlobalRegion") // but is added for backwards compatibility
@JvmOverloads
public constructor (
name: String? = null,
dnsSuffix: String? = null,
dualStackDnsSuffix: String? = null,
supportsFIPS: Boolean? = null,
supportsDualStack: Boolean? = null,
) : this(
name,
dnsSuffix,
dualStackDnsSuffix,
supportsFIPS,
supportsDualStack,
null,
)

public fun mergeWith(other: PartitionConfig): PartitionConfig =
PartitionConfig(
other.name ?: name,
Expand Down
15 changes: 2 additions & 13 deletions services/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,8 @@ subprojects {

if (project.name == "s3") {
dependencies {
val services = project.parent?.subprojects

if (services?.any { it.name == "s3control" } == true) {
implementation(project(":services:s3control"))
} else {
implementation("aws.sdk.kotlin:s3control:+")
}

if (services?.any { it.name == "sts" } == true) {
implementation(project(":services:sts"))
} else {
implementation("aws.sdk.kotlin:sts:+")
}
implementation(project(":services:s3control"))
implementation(project(":services:sts"))
implementation(libs.smithy.kotlin.aws.signing.crt)
}
}
Expand Down

0 comments on commit 87b1ace

Please sign in to comment.