Skip to content

Commit 7cb0a84

Browse files
committed
Merge branch 'kn-main' of github.com:awslabs/aws-crt-kotlin into kn-main-catapult
2 parents 5e78898 + d903938 commit 7cb0a84

File tree

18 files changed

+108
-96
lines changed

18 files changed

+108
-96
lines changed

.changes/aa10152c-0040-46b3-8551-ed63aca0c6ee.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ jobs:
6666
uses: ./.github/actions/setup-build
6767
- name: Build and Test ${{ env.PACKAGE_NAME }}
6868
run: |
69-
./gradlew build
69+
if [ "${{ matrix.os }}" = "macos-13" ]; then
70+
./gradlew build -PiosSimulatorDevice="iPhone 15"
71+
else
72+
./gradlew build
73+
fi
7074
- name: Save Test Reports
7175
if: failure()
7276
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## [0.10.2] - 07/24/2025
4+
5+
## [0.10.1] - 07/21/2025
6+
7+
## [0.10.0] - 07/15/2025
8+
9+
### Features
10+
* Upgrade to Kotlin 2.2.0
11+
12+
### Fixes
13+
* [#1295](https://github.com/smithy-lang/smithy-kotlin/issues/1295) Enable building this project on JDK21 by setting -Xjdk-release flag
14+
315
## [0.9.2] - 06/18/2025
416

517
### Fixes

aws-crt-kotlin/api/aws-crt-kotlin.api

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,10 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningResult {
406406
public abstract interface class aws/sdk/kotlin/crt/http/Headers {
407407
public static final field Companion Laws/sdk/kotlin/crt/http/Headers$Companion;
408408
public abstract fun contains (Ljava/lang/String;)Z
409-
public abstract fun contains (Ljava/lang/String;Ljava/lang/String;)Z
409+
public fun contains (Ljava/lang/String;Ljava/lang/String;)Z
410410
public abstract fun entries ()Ljava/util/Set;
411-
public abstract fun forEach (Lkotlin/jvm/functions/Function2;)V
412-
public abstract fun get (Ljava/lang/String;)Ljava/lang/String;
411+
public fun forEach (Lkotlin/jvm/functions/Function2;)V
412+
public fun get (Ljava/lang/String;)Ljava/lang/String;
413413
public abstract fun getAll (Ljava/lang/String;)Ljava/util/List;
414414
public abstract fun isEmpty ()Z
415415
public abstract fun names ()Ljava/util/Set;
@@ -622,8 +622,8 @@ public final class aws/sdk/kotlin/crt/http/HttpRequest$Companion {
622622

623623
public abstract interface class aws/sdk/kotlin/crt/http/HttpRequestBodyStream {
624624
public static final field Companion Laws/sdk/kotlin/crt/http/HttpRequestBodyStream$Companion;
625-
public abstract fun resetPosition ()Z
626-
public abstract fun sendRequestBody (Laws/sdk/kotlin/crt/io/MutableBuffer;)Z
625+
public fun resetPosition ()Z
626+
public fun sendRequestBody (Laws/sdk/kotlin/crt/io/MutableBuffer;)Z
627627
}
628628

629629
public final class aws/sdk/kotlin/crt/http/HttpRequestBodyStream$Companion {
@@ -686,11 +686,11 @@ public final class aws/sdk/kotlin/crt/http/HttpStreamMetricsJVMKt {
686686
}
687687

688688
public abstract interface class aws/sdk/kotlin/crt/http/HttpStreamResponseHandler {
689-
public abstract fun onMetrics (Laws/sdk/kotlin/crt/http/HttpStream;Laws/sdk/kotlin/crt/http/HttpStreamMetrics;)V
690-
public abstract fun onResponseBody (Laws/sdk/kotlin/crt/http/HttpStream;Laws/sdk/kotlin/crt/io/Buffer;)I
689+
public fun onMetrics (Laws/sdk/kotlin/crt/http/HttpStream;Laws/sdk/kotlin/crt/http/HttpStreamMetrics;)V
690+
public fun onResponseBody (Laws/sdk/kotlin/crt/http/HttpStream;Laws/sdk/kotlin/crt/io/Buffer;)I
691691
public abstract fun onResponseComplete (Laws/sdk/kotlin/crt/http/HttpStream;I)V
692692
public abstract fun onResponseHeaders (Laws/sdk/kotlin/crt/http/HttpStream;IILjava/util/List;)V
693-
public abstract fun onResponseHeadersDone (Laws/sdk/kotlin/crt/http/HttpStream;I)V
693+
public fun onResponseHeadersDone (Laws/sdk/kotlin/crt/http/HttpStream;I)V
694694
}
695695

696696
public final class aws/sdk/kotlin/crt/http/HttpStreamResponseHandler$DefaultImpls {
@@ -702,6 +702,7 @@ public final class aws/sdk/kotlin/crt/http/HttpStreamResponseHandler$DefaultImpl
702702
public abstract interface class aws/sdk/kotlin/crt/io/Buffer {
703703
public static final field Companion Laws/sdk/kotlin/crt/io/Buffer$Companion;
704704
public abstract fun copyTo ([BI)I
705+
public static synthetic fun copyTo$default (Laws/sdk/kotlin/crt/io/Buffer;[BIILjava/lang/Object;)I
705706
public abstract fun getLen ()I
706707
public abstract fun readAll ()[B
707708
}
@@ -719,6 +720,7 @@ public final class aws/sdk/kotlin/crt/io/BufferKt {
719720
}
720721

721722
public final class aws/sdk/kotlin/crt/io/ClientBootstrap : aws/sdk/kotlin/crt/AsyncShutdown, aws/sdk/kotlin/crt/Closeable {
723+
public fun <init> ()V
722724
public fun <init> (Laws/sdk/kotlin/crt/io/EventLoopGroup;Laws/sdk/kotlin/crt/io/HostResolver;)V
723725
public fun close ()V
724726
public fun waitForShutdown (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@@ -733,6 +735,7 @@ public final class aws/sdk/kotlin/crt/io/EventLoopGroup : aws/sdk/kotlin/crt/Asy
733735
}
734736

735737
public final class aws/sdk/kotlin/crt/io/HostResolver : aws/sdk/kotlin/crt/AsyncShutdown, aws/sdk/kotlin/crt/Closeable {
738+
public fun <init> ()V
736739
public fun <init> (Laws/sdk/kotlin/crt/io/EventLoopGroup;)V
737740
public fun <init> (Laws/sdk/kotlin/crt/io/EventLoopGroup;I)V
738741
public fun close ()V
@@ -816,14 +819,8 @@ public final class aws/sdk/kotlin/crt/io/SocketType : java/lang/Enum {
816819
}
817820

818821
public final class aws/sdk/kotlin/crt/io/TlsCipherPreference : java/lang/Enum {
819-
public static final field KMS_PQ_SIKE_TLS_V1_0_2019_11 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
820-
public static final field KMS_PQ_SIKE_TLS_V1_0_2020_02 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
821-
public static final field KMS_PQ_TLS_V1_0_2019_06 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
822-
public static final field KMS_PQ_TLS_V1_0_2020_02 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
823-
public static final field KMS_PQ_TLS_V1_0_2020_07 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
824822
public static final field PQ_DEFAULT Laws/sdk/kotlin/crt/io/TlsCipherPreference;
825823
public static final field PQ_TLSV1_2_2024_10 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
826-
public static final field PQ_TLS_V1_0_2021_05 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
827824
public static final field SYSTEM_DEFAULT Laws/sdk/kotlin/crt/io/TlsCipherPreference;
828825
public static fun getEntries ()Lkotlin/enums/EnumEntries;
829826
public final fun getValue ()I

aws-crt-kotlin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ plugins {
1818
}
1919

2020
val sdkVersion: String by project
21-
group = properties["publishGroupName"] ?: error("missing publishGroupName")
21+
group = "aws.sdk.kotlin.crt"
2222
version = sdkVersion
2323
description = "Kotlin Multiplatform bindings for AWS Common Runtime"
2424

aws-crt-kotlin/common/src/aws/sdk/kotlin/crt/io/ClientBootstrap.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import aws.sdk.kotlin.crt.Closeable
1515
public expect class ClientBootstrap(elg: EventLoopGroup, hr: HostResolver) :
1616
Closeable,
1717
AsyncShutdown {
18+
public constructor()
19+
1820
override suspend fun waitForShutdown()
1921
override fun close()
2022
}

aws-crt-kotlin/common/src/aws/sdk/kotlin/crt/io/HostResolver.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public expect class HostResolver(elg: EventLoopGroup, maxEntries: Int) :
1414
Closeable,
1515
AsyncShutdown {
1616
public constructor(elg: EventLoopGroup)
17+
public constructor()
18+
1719
override fun close()
1820
override suspend fun waitForShutdown()
1921
}

aws-crt-kotlin/common/src/aws/sdk/kotlin/crt/io/TlsCipherPreference.kt

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,6 @@ public enum class TlsCipherPreference(public val value: Int) {
1818
*/
1919
SYSTEM_DEFAULT(0),
2020

21-
/**
22-
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
23-
*/
24-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
25-
KMS_PQ_TLS_V1_0_2019_06(1),
26-
27-
/**
28-
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
29-
*/
30-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
31-
KMS_PQ_SIKE_TLS_V1_0_2019_11(2),
32-
33-
/**
34-
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
35-
*/
36-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
37-
KMS_PQ_TLS_V1_0_2020_02(3),
38-
39-
/**
40-
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
41-
*/
42-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
43-
KMS_PQ_SIKE_TLS_V1_0_2020_02(4),
44-
45-
/**
46-
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
47-
*/
48-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
49-
KMS_PQ_TLS_V1_0_2020_07(5),
50-
51-
/**
52-
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
53-
*/
54-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
55-
PQ_TLS_V1_0_2021_05(6),
56-
5721
/**
5822
* This TLS cipher preference list contains post-quantum key exchange algorithms that have been standardized by
5923
* NIST. PQ algorithms in this preference list will be used in hybrid mode, and always combined with a classical

aws-crt-kotlin/jvm/src/aws/sdk/kotlin/crt/io/ClientBootstrapJVM.kt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,27 @@ import aws.sdk.kotlin.crt.Closeable
1010
import kotlinx.coroutines.future.await
1111
import software.amazon.awssdk.crt.io.ClientBootstrap as ClientBootstrapJni
1212

13-
public actual class ClientBootstrap actual constructor(elg: EventLoopGroup, hr: HostResolver) :
14-
Closeable,
13+
public actual class ClientBootstrap private constructor(
14+
private val elg: EventLoopGroup,
15+
private val manageElg: Boolean,
16+
private val hr: HostResolver,
17+
private val manageHr: Boolean,
18+
) : Closeable,
1519
AsyncShutdown {
20+
21+
public actual constructor() : this(EventLoopGroup(), true)
22+
23+
private constructor(elg: EventLoopGroup, manageElg: Boolean) : this(elg, manageElg, HostResolver(elg), true)
24+
25+
public actual constructor(elg: EventLoopGroup, hr: HostResolver) : this(elg, false, hr, false)
26+
1627
internal val jniBootstrap = ClientBootstrapJni(elg.jniElg, hr.jniHr)
1728

1829
actual override fun close() {
1930
jniBootstrap.close()
31+
32+
if (manageHr) hr.close()
33+
if (manageElg) elg.close()
2034
}
2135

2236
actual override suspend fun waitForShutdown() {

aws-crt-kotlin/jvm/src/aws/sdk/kotlin/crt/io/HostResolverJVM.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,22 @@ import aws.sdk.kotlin.crt.AsyncShutdown
99
import aws.sdk.kotlin.crt.Closeable
1010
import software.amazon.awssdk.crt.io.HostResolver as HostResolverJni
1111

12-
public actual class HostResolver actual constructor(elg: EventLoopGroup, maxEntries: Int) :
13-
Closeable,
12+
public actual class HostResolver private constructor(
13+
private val elg: EventLoopGroup,
14+
private val manageElg: Boolean,
15+
maxEntries: Int,
16+
) : Closeable,
1417
AsyncShutdown {
1518
internal val jniHr = HostResolverJni(elg.jniElg, maxEntries)
1619

17-
public actual constructor(elg: EventLoopGroup) : this(elg, DEFAULT_MAX_ENTRIES)
20+
public actual constructor(elg: EventLoopGroup, maxEntries: Int) : this(elg, false, maxEntries)
21+
public actual constructor(elg: EventLoopGroup) : this(elg, false, DEFAULT_MAX_ENTRIES)
22+
public actual constructor() : this(EventLoopGroup(), true, DEFAULT_MAX_ENTRIES)
1823

1924
actual override fun close() {
2025
jniHr.close()
26+
27+
if (manageElg) elg.close()
2128
}
2229

2330
actual override suspend fun waitForShutdown() {

0 commit comments

Comments
 (0)