From 9a09383bf1fb1b484d3f8f6530eb41c2244ddb83 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 19 Oct 2023 14:59:16 -0400 Subject: [PATCH 01/11] Bump to 0.2.4 build plugin --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 24f527cf..eb0f81b8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,7 @@ buildscript { // only need to include it here, imports in subprojects will work automagically classpath("aws.sdk.kotlin:build-plugins") { version { - require("0.2.2") + require("0.2.4") } } } From 3cad8ee3e86bd382eaaf3615e95f40686a7e0255 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 19 Oct 2023 17:24:16 -0400 Subject: [PATCH 02/11] Add native base implementation --- aws-crt-kotlin/api/android/aws-crt-kotlin.api | 11 +++++ aws-crt-kotlin/api/jvm/aws-crt-kotlin.api | 11 +++++ .../src/aws/sdk/kotlin/crt/CRTNative.kt | 44 +++++++++++++++++++ .../src/aws/sdk/kotlin/crt/PlatformNative.kt | 21 +++++++++ .../CachedCredentialsProviderNative.kt | 24 ++++++++++ .../DefaultChainCredentialsProviderNative.kt | 24 ++++++++++ .../EcsCredentialsProviderNative.kt | 25 +++++++++++ .../ProfileCredentialsProviderNative.kt | 24 ++++++++++ .../StaticCredentialsProviderNative.kt | 27 ++++++++++++ .../StsAssumeRoleCredentialsProviderNative.kt | 24 ++++++++++ ...StsWebIdentityCredentialsProviderNative.kt | 24 ++++++++++ .../X509CredentialsProviderNative.kt | 24 ++++++++++ .../crt/auth/signing/AwsSignerNative.kt | 44 +++++++++++++++++++ .../http/HttpClientConnectionManagerNative.kt | 36 +++++++++++++++ .../kotlin/crt/io/ClientBootstrapNative.kt | 19 ++++++++ .../sdk/kotlin/crt/io/EventLoopGroupNative.kt | 28 ++++++++++++ .../sdk/kotlin/crt/io/HostResolverNative.kt | 21 +++++++++ .../sdk/kotlin/crt/io/MutableBufferNative.kt | 36 +++++++++++++++ .../aws/sdk/kotlin/crt/io/TlsContextNative.kt | 19 ++++++++ .../src/aws/sdk/kotlin/crt/io/UriNative.kt | 8 ++++ .../aws/sdk/kotlin/crt/util/DigestNative.kt | 18 ++++++++ .../test/aws/sdk/kotlin/crt/UtilsNative.kt | 12 +++++ 22 files changed, 524 insertions(+) create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/CRTNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/PlatformNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/CachedCredentialsProviderNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/DefaultChainCredentialsProviderNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/EcsCredentialsProviderNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/ProfileCredentialsProviderNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StaticCredentialsProviderNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StsAssumeRoleCredentialsProviderNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StsWebIdentityCredentialsProviderNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/X509CredentialsProviderNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/signing/AwsSignerNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/http/HttpClientConnectionManagerNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/ClientBootstrapNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/EventLoopGroupNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/HostResolverNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/MutableBufferNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/TlsContextNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/UriNative.kt create mode 100644 aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/util/DigestNative.kt create mode 100644 aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt diff --git a/aws-crt-kotlin/api/android/aws-crt-kotlin.api b/aws-crt-kotlin/api/android/aws-crt-kotlin.api index b821f83e..6098c24e 100644 --- a/aws-crt-kotlin/api/android/aws-crt-kotlin.api +++ b/aws-crt-kotlin/api/android/aws-crt-kotlin.api @@ -42,6 +42,7 @@ public final class aws/sdk/kotlin/crt/LogDestination : java/lang/Enum { public static final field None Laws/sdk/kotlin/crt/LogDestination; public static final field Stderr Laws/sdk/kotlin/crt/LogDestination; public static final field Stdout Laws/sdk/kotlin/crt/LogDestination; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/LogDestination; public static fun values ()[Laws/sdk/kotlin/crt/LogDestination; } @@ -54,6 +55,7 @@ public final class aws/sdk/kotlin/crt/LogLevel : java/lang/Enum { public static final field None Laws/sdk/kotlin/crt/LogLevel; public static final field Trace Laws/sdk/kotlin/crt/LogLevel; public static final field Warn Laws/sdk/kotlin/crt/LogLevel; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/LogLevel; public static fun values ()[Laws/sdk/kotlin/crt/LogLevel; @@ -282,6 +284,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSignatureType : java/lang/ public static final field HTTP_REQUEST_TRAILING_HEADERS Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; public static final field HTTP_REQUEST_VIA_HEADERS Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; public static final field HTTP_REQUEST_VIA_QUERY_PARAMS Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; public static fun values ()[Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; @@ -290,6 +293,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSignatureType : java/lang/ public final class aws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType : java/lang/Enum { public static final field NONE Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType; public static final field X_AMZ_CONTENT_SHA256 Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType; public static fun values ()[Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType; @@ -314,6 +318,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSigner { public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm : java/lang/Enum { public static final field SIGV4 Laws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm; public static final field SIGV4_ASYMMETRIC Laws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm; public static fun values ()[Laws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm; @@ -516,6 +521,7 @@ public final class aws/sdk/kotlin/crt/http/HttpHeaderBlock : java/lang/Enum { public static final field MAIN Laws/sdk/kotlin/crt/http/HttpHeaderBlock; public static final field TRAILING Laws/sdk/kotlin/crt/http/HttpHeaderBlock; public final fun getBlockType ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/http/HttpHeaderBlock; public static fun values ()[Laws/sdk/kotlin/crt/http/HttpHeaderBlock; } @@ -538,6 +544,7 @@ public final class aws/sdk/kotlin/crt/http/HttpMonitoringOptions { public final class aws/sdk/kotlin/crt/http/HttpProxyAuthorizationType : java/lang/Enum { public static final field Basic Laws/sdk/kotlin/crt/http/HttpProxyAuthorizationType; public static final field None Laws/sdk/kotlin/crt/http/HttpProxyAuthorizationType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/http/HttpProxyAuthorizationType; public static fun values ()[Laws/sdk/kotlin/crt/http/HttpProxyAuthorizationType; @@ -718,6 +725,7 @@ public final class aws/sdk/kotlin/crt/io/SocketDomain : java/lang/Enum { public static final field IPv4 Laws/sdk/kotlin/crt/io/SocketDomain; public static final field IPv6 Laws/sdk/kotlin/crt/io/SocketDomain; public static final field LOCAL Laws/sdk/kotlin/crt/io/SocketDomain; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/io/SocketDomain; public static fun values ()[Laws/sdk/kotlin/crt/io/SocketDomain; @@ -747,6 +755,7 @@ public final class aws/sdk/kotlin/crt/io/SocketOptions { public final class aws/sdk/kotlin/crt/io/SocketType : java/lang/Enum { public static final field DGRAM Laws/sdk/kotlin/crt/io/SocketType; public static final field STREAM Laws/sdk/kotlin/crt/io/SocketType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/io/SocketType; public static fun values ()[Laws/sdk/kotlin/crt/io/SocketType; @@ -760,6 +769,7 @@ public final class aws/sdk/kotlin/crt/io/TlsCipherPreference : java/lang/Enum { public static final field KMS_PQ_TLS_V1_0_2020_07 Laws/sdk/kotlin/crt/io/TlsCipherPreference; public static final field PQ_TLS_V1_0_2021_05 Laws/sdk/kotlin/crt/io/TlsCipherPreference; public static final field SYSTEM_DEFAULT Laws/sdk/kotlin/crt/io/TlsCipherPreference; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public final fun isSupported ()Z public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/io/TlsCipherPreference; @@ -844,6 +854,7 @@ public final class aws/sdk/kotlin/crt/io/TlsVersion : java/lang/Enum { public static final field TLS_V1_2 Laws/sdk/kotlin/crt/io/TlsVersion; public static final field TLS_V1_3 Laws/sdk/kotlin/crt/io/TlsVersion; public static final field TLSv1 Laws/sdk/kotlin/crt/io/TlsVersion; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/io/TlsVersion; public static fun values ()[Laws/sdk/kotlin/crt/io/TlsVersion; diff --git a/aws-crt-kotlin/api/jvm/aws-crt-kotlin.api b/aws-crt-kotlin/api/jvm/aws-crt-kotlin.api index b821f83e..6098c24e 100644 --- a/aws-crt-kotlin/api/jvm/aws-crt-kotlin.api +++ b/aws-crt-kotlin/api/jvm/aws-crt-kotlin.api @@ -42,6 +42,7 @@ public final class aws/sdk/kotlin/crt/LogDestination : java/lang/Enum { public static final field None Laws/sdk/kotlin/crt/LogDestination; public static final field Stderr Laws/sdk/kotlin/crt/LogDestination; public static final field Stdout Laws/sdk/kotlin/crt/LogDestination; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/LogDestination; public static fun values ()[Laws/sdk/kotlin/crt/LogDestination; } @@ -54,6 +55,7 @@ public final class aws/sdk/kotlin/crt/LogLevel : java/lang/Enum { public static final field None Laws/sdk/kotlin/crt/LogLevel; public static final field Trace Laws/sdk/kotlin/crt/LogLevel; public static final field Warn Laws/sdk/kotlin/crt/LogLevel; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/LogLevel; public static fun values ()[Laws/sdk/kotlin/crt/LogLevel; @@ -282,6 +284,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSignatureType : java/lang/ public static final field HTTP_REQUEST_TRAILING_HEADERS Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; public static final field HTTP_REQUEST_VIA_HEADERS Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; public static final field HTTP_REQUEST_VIA_QUERY_PARAMS Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; public static fun values ()[Laws/sdk/kotlin/crt/auth/signing/AwsSignatureType; @@ -290,6 +293,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSignatureType : java/lang/ public final class aws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType : java/lang/Enum { public static final field NONE Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType; public static final field X_AMZ_CONTENT_SHA256 Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType; public static fun values ()[Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType; @@ -314,6 +318,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSigner { public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm : java/lang/Enum { public static final field SIGV4 Laws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm; public static final field SIGV4_ASYMMETRIC Laws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm; public static fun values ()[Laws/sdk/kotlin/crt/auth/signing/AwsSigningAlgorithm; @@ -516,6 +521,7 @@ public final class aws/sdk/kotlin/crt/http/HttpHeaderBlock : java/lang/Enum { public static final field MAIN Laws/sdk/kotlin/crt/http/HttpHeaderBlock; public static final field TRAILING Laws/sdk/kotlin/crt/http/HttpHeaderBlock; public final fun getBlockType ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/http/HttpHeaderBlock; public static fun values ()[Laws/sdk/kotlin/crt/http/HttpHeaderBlock; } @@ -538,6 +544,7 @@ public final class aws/sdk/kotlin/crt/http/HttpMonitoringOptions { public final class aws/sdk/kotlin/crt/http/HttpProxyAuthorizationType : java/lang/Enum { public static final field Basic Laws/sdk/kotlin/crt/http/HttpProxyAuthorizationType; public static final field None Laws/sdk/kotlin/crt/http/HttpProxyAuthorizationType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/http/HttpProxyAuthorizationType; public static fun values ()[Laws/sdk/kotlin/crt/http/HttpProxyAuthorizationType; @@ -718,6 +725,7 @@ public final class aws/sdk/kotlin/crt/io/SocketDomain : java/lang/Enum { public static final field IPv4 Laws/sdk/kotlin/crt/io/SocketDomain; public static final field IPv6 Laws/sdk/kotlin/crt/io/SocketDomain; public static final field LOCAL Laws/sdk/kotlin/crt/io/SocketDomain; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/io/SocketDomain; public static fun values ()[Laws/sdk/kotlin/crt/io/SocketDomain; @@ -747,6 +755,7 @@ public final class aws/sdk/kotlin/crt/io/SocketOptions { public final class aws/sdk/kotlin/crt/io/SocketType : java/lang/Enum { public static final field DGRAM Laws/sdk/kotlin/crt/io/SocketType; public static final field STREAM Laws/sdk/kotlin/crt/io/SocketType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/io/SocketType; public static fun values ()[Laws/sdk/kotlin/crt/io/SocketType; @@ -760,6 +769,7 @@ public final class aws/sdk/kotlin/crt/io/TlsCipherPreference : java/lang/Enum { public static final field KMS_PQ_TLS_V1_0_2020_07 Laws/sdk/kotlin/crt/io/TlsCipherPreference; public static final field PQ_TLS_V1_0_2021_05 Laws/sdk/kotlin/crt/io/TlsCipherPreference; public static final field SYSTEM_DEFAULT Laws/sdk/kotlin/crt/io/TlsCipherPreference; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public final fun isSupported ()Z public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/io/TlsCipherPreference; @@ -844,6 +854,7 @@ public final class aws/sdk/kotlin/crt/io/TlsVersion : java/lang/Enum { public static final field TLS_V1_2 Laws/sdk/kotlin/crt/io/TlsVersion; public static final field TLS_V1_3 Laws/sdk/kotlin/crt/io/TlsVersion; public static final field TLSv1 Laws/sdk/kotlin/crt/io/TlsVersion; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/crt/io/TlsVersion; public static fun values ()[Laws/sdk/kotlin/crt/io/TlsVersion; diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/CRTNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/CRTNative.kt new file mode 100644 index 00000000..9dae8d4a --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/CRTNative.kt @@ -0,0 +1,44 @@ +package aws.sdk.kotlin.crt + +public actual object CRT { + /** + * Initialize the CRT libraries if needed + */ + public actual fun initRuntime(block: Config.() -> Unit) { } + + /** + * Returns the last error on the current thread. + * @return Last error code recorded in this thread + */ + public actual fun lastError(): Int { + TODO("Not yet implemented") + } + + /** + * Given an integer error code from an internal operation + * @param errorCode An error code returned from an exception or other native function call + * @return A user-friendly description of the error + */ + public actual fun errorString(errorCode: Int): String? { + TODO("Not yet implemented") + } + + /** + * Given an integer error code from an internal operation + * + * @param errorCode An error code returned from an exception or other native + * function call + * @return A string identifier for the error + */ + public actual fun errorName(errorCode: Int): String? { + TODO("Not yet implemented") + } + + /** + * @return The number of bytes allocated in native resources. If aws.crt.memory.tracing is 1 or 2, this will + * be a non-zero value. Otherwise, no tracing will be done, and the value will always be 0 + */ + public actual fun nativeMemory(): Long { + TODO("Not yet implemented") + } +} \ No newline at end of file diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/PlatformNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/PlatformNative.kt new file mode 100644 index 00000000..2aeb14ef --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/PlatformNative.kt @@ -0,0 +1,21 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +package aws.sdk.kotlin.crt + +internal actual object Platform { + /** + * Get an environment variable by name + */ + internal actual fun getenv(name: String): String? { + TODO("Not yet implemented") + } + + /** + * Get the current time in epoch milliseconds + */ + internal actual fun epochMilliNow(): Long { + TODO("Not yet implemented") + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/CachedCredentialsProviderNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/CachedCredentialsProviderNative.kt new file mode 100644 index 00000000..b50f22ec --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/CachedCredentialsProviderNative.kt @@ -0,0 +1,24 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.credentials + + +public actual class CachedCredentialsProvider internal actual constructor(builder: CachedCredentialsProviderBuilder) : + CredentialsProvider { + public actual companion object {} + + override suspend fun getCredentials(): Credentials { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/DefaultChainCredentialsProviderNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/DefaultChainCredentialsProviderNative.kt new file mode 100644 index 00000000..cc979001 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/DefaultChainCredentialsProviderNative.kt @@ -0,0 +1,24 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.credentials + +public actual class DefaultChainCredentialsProvider internal actual constructor(builder: DefaultChainCredentialsProviderBuilder) : + CredentialsProvider { + public actual companion object {} + + override suspend fun getCredentials(): Credentials { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } + +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/EcsCredentialsProviderNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/EcsCredentialsProviderNative.kt new file mode 100644 index 00000000..bface44d --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/EcsCredentialsProviderNative.kt @@ -0,0 +1,25 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.credentials + +public actual class EcsCredentialsProvider +internal actual constructor(builder: EcsCredentialsProviderBuilder) : + CredentialsProvider { + public actual companion object {} + + override suspend fun getCredentials(): Credentials { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } + +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/ProfileCredentialsProviderNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/ProfileCredentialsProviderNative.kt new file mode 100644 index 00000000..d681bb97 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/ProfileCredentialsProviderNative.kt @@ -0,0 +1,24 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.credentials + +public actual class ProfileCredentialsProvider +internal actual constructor(builder: ProfileCredentialsProviderBuilder) : + CredentialsProvider { + public actual companion object {} + + override suspend fun getCredentials(): Credentials { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StaticCredentialsProviderNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StaticCredentialsProviderNative.kt new file mode 100644 index 00000000..85c08864 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StaticCredentialsProviderNative.kt @@ -0,0 +1,27 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.credentials + +/** + * A credentials provider for a fixed set of credentials + */ +public actual class StaticCredentialsProvider internal actual constructor(builder: StaticCredentialsProviderBuilder) : + CredentialsProvider { + public actual companion object {} + + override suspend fun getCredentials(): Credentials { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } + +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StsAssumeRoleCredentialsProviderNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StsAssumeRoleCredentialsProviderNative.kt new file mode 100644 index 00000000..14d113e6 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StsAssumeRoleCredentialsProviderNative.kt @@ -0,0 +1,24 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.credentials + +public actual class StsAssumeRoleCredentialsProvider +internal actual constructor(builder: StsAssumeRoleCredentialsProviderBuilder) : + CredentialsProvider { + public actual companion object {} + + override suspend fun getCredentials(): Credentials { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StsWebIdentityCredentialsProviderNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StsWebIdentityCredentialsProviderNative.kt new file mode 100644 index 00000000..817043de --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/StsWebIdentityCredentialsProviderNative.kt @@ -0,0 +1,24 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.credentials + +public actual class StsWebIdentityCredentialsProvider +internal actual constructor(builder: StsWebIdentityCredentialsProviderBuilder) : + CredentialsProvider { + public actual companion object {} + + override suspend fun getCredentials(): Credentials { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/X509CredentialsProviderNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/X509CredentialsProviderNative.kt new file mode 100644 index 00000000..77e52921 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/credentials/X509CredentialsProviderNative.kt @@ -0,0 +1,24 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.credentials + +public actual class X509CredentialsProvider internal actual constructor(builder: X509CredentialsProviderBuilder) : + CredentialsProvider { + + public actual companion object {} + + override suspend fun getCredentials(): Credentials { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/signing/AwsSignerNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/signing/AwsSignerNative.kt new file mode 100644 index 00000000..5e62c6a2 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/auth/signing/AwsSignerNative.kt @@ -0,0 +1,44 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.auth.signing + +import aws.sdk.kotlin.crt.http.* + +/** + * Static class for a variety of AWS signing APIs. + */ +public actual object AwsSigner { + public actual suspend fun signRequest( + request: HttpRequest, + config: AwsSigningConfig, + ): HttpRequest { + TODO("Not yet implemented") + } + + public actual suspend fun sign( + request: HttpRequest, + config: AwsSigningConfig, + ): AwsSigningResult { + TODO("Not yet implemented") + } + + public actual suspend fun signChunk( + chunkBody: ByteArray, + prevSignature: ByteArray, + config: AwsSigningConfig, + ): AwsSigningResult { + TODO("Not yet implemented") + } + + public actual suspend fun signChunkTrailer( + trailingHeaders: Headers, + prevSignature: ByteArray, + config: AwsSigningConfig, + ): AwsSigningResult { + TODO("Not yet implemented") + } + +} \ No newline at end of file diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/http/HttpClientConnectionManagerNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/http/HttpClientConnectionManagerNative.kt new file mode 100644 index 00000000..f934b431 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/http/HttpClientConnectionManagerNative.kt @@ -0,0 +1,36 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.http + +import aws.sdk.kotlin.crt.AsyncShutdown +import aws.sdk.kotlin.crt.Closeable + +public actual class HttpClientConnectionManager actual constructor( + public actual val options: HttpClientConnectionManagerOptions, +) : Closeable, AsyncShutdown { + /** + * Request an HttpClientConnection from the pool + */ + public actual suspend fun acquireConnection(): HttpClientConnection { + TODO("Not yet implemented") + } + + /** + * Releases this HttpClientConnection back into the Connection Pool, and allows another Request to acquire this connection. + * @param conn Connection to release + */ + public actual fun releaseConnection(conn: HttpClientConnection) { + } + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + +} \ No newline at end of file diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/ClientBootstrapNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/ClientBootstrapNative.kt new file mode 100644 index 00000000..c9e20f76 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/ClientBootstrapNative.kt @@ -0,0 +1,19 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.io + +import aws.sdk.kotlin.crt.AsyncShutdown +import aws.sdk.kotlin.crt.Closeable + +public actual class ClientBootstrap actual constructor(elg: EventLoopGroup, hr: HostResolver) : Closeable, AsyncShutdown { + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/EventLoopGroupNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/EventLoopGroupNative.kt new file mode 100644 index 00000000..c4fb9043 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/EventLoopGroupNative.kt @@ -0,0 +1,28 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.io + +import aws.sdk.kotlin.crt.AsyncShutdown +import aws.sdk.kotlin.crt.Closeable + +/** + * Creates a new event loop group for the I/O subsystem to use to run blocking I/O requests + * This class wraps the aws_event_loop_group from aws-c-io + * + * @param maxThreads If maxThreads == 0, then the loop count will be the number of available processors on the machine. + * Otherwise, maxThreads will be the number of event loops in the group. + * @throws [aws.sdk.kotlin.crt.CrtRuntimeException] If the system is unable to allocate space for a native event loop group + */ +public actual class EventLoopGroup actual constructor(maxThreads: Int) : Closeable, AsyncShutdown { + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } + +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/HostResolverNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/HostResolverNative.kt new file mode 100644 index 00000000..bf7d4432 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/HostResolverNative.kt @@ -0,0 +1,21 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.io + +import aws.sdk.kotlin.crt.AsyncShutdown +import aws.sdk.kotlin.crt.Closeable + +public actual class HostResolver actual constructor(elg: EventLoopGroup, maxEntries: Int) : Closeable, AsyncShutdown { + public actual constructor(elg: EventLoopGroup) : this(elg, DEFAULT_MAX_ENTRIES) + + override suspend fun waitForShutdown() { + TODO("Not yet implemented") + } + + override fun close() { + TODO("Not yet implemented") + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/MutableBufferNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/MutableBufferNative.kt new file mode 100644 index 00000000..d285a7ab --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/MutableBufferNative.kt @@ -0,0 +1,36 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +package aws.sdk.kotlin.crt.io + +/** + * Represents a mutable linear range of bytes that can be written to. + * Instance of this class has no additional state except the bytes themselves. + * + * NOTE: Platform implementations should provide direct access to the underlying bytes + */ +public actual class MutableBuffer { + /** + * The amount of remaining write capacity before the buffer is full + */ + public actual val writeRemaining: Int + get() = TODO("Not yet implemented") + + /** + * Write as much of [length] bytes from [src] as possible starting at [offset]. + * The number of bytes written is returned which may be less than [length] + */ + public actual fun write(src: ByteArray, offset: Int, length: Int): Int { + TODO("Not yet implemented") + } + + public actual companion object { + /** + * Create a buffer instance backed by [src] + */ + public actual fun of(src: ByteArray): MutableBuffer { + TODO("Not yet implemented") + } + } +} diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/TlsContextNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/TlsContextNative.kt new file mode 100644 index 00000000..13a7d2a6 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/TlsContextNative.kt @@ -0,0 +1,19 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.io + +import aws.sdk.kotlin.crt.Closeable + +public actual class TlsContext actual constructor(options: TlsContextOptions?) : Closeable { + public actual companion object {} + + override fun close() { + TODO("Not yet implemented") + } +} + +internal actual fun isCipherSupported(cipher: TlsCipherPreference): Boolean = TODO("Not yet implemented") +internal actual fun isAlpnSupported(): Boolean = TODO("Not yet implemented") diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/UriNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/UriNative.kt new file mode 100644 index 00000000..b471f52b --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/UriNative.kt @@ -0,0 +1,8 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.io + +internal actual fun parseUri(uri: String): Uri = TODO("Not yet implemented") diff --git a/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/util/DigestNative.kt b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/util/DigestNative.kt new file mode 100644 index 00000000..77d74826 --- /dev/null +++ b/aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/util/DigestNative.kt @@ -0,0 +1,18 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt.util + +/** + * Utility object for various hash functions + */ +public actual object Digest { + /** + * Calculate the SHA-256 hash of the input [buffer] + */ + public actual fun sha256(buffer: ByteArray): ByteArray { + TODO("Not yet implemented") + } +} \ No newline at end of file diff --git a/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt b/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt new file mode 100644 index 00000000..54c95bec --- /dev/null +++ b/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt @@ -0,0 +1,12 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk.kotlin.crt + + +import kotlinx.coroutines.CoroutineScope +import kotlin.coroutines.CoroutineContext + +actual fun runSuspendTest(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T = TODO("Not yet implemented") From ea6517e08dba9aaf9bd7f8228149bcf6719181e0 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 19 Oct 2023 17:34:50 -0400 Subject: [PATCH 03/11] Bump to 0.2.5 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index eb0f81b8..dfda61d7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,7 @@ buildscript { // only need to include it here, imports in subprojects will work automagically classpath("aws.sdk.kotlin:build-plugins") { version { - require("0.2.4") + require("0.2.5") } } } From 2a50723da3a03aaeb5d645136f24638aa964bb43 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 19 Oct 2023 17:44:26 -0400 Subject: [PATCH 04/11] Fix test runner --- .../native/test/aws/sdk/kotlin/crt/UtilsNative.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt b/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt index 54c95bec..19ad86e9 100644 --- a/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt +++ b/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt @@ -7,6 +7,11 @@ package aws.sdk.kotlin.crt import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.runBlocking import kotlin.coroutines.CoroutineContext -actual fun runSuspendTest(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T = TODO("Not yet implemented") +actual fun runSuspendTest(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T { + return runBlocking(context) { + block() + } +} From 525737b08a2c56957a1026c9e3aaceb635c5dd95 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 19 Oct 2023 17:58:22 -0400 Subject: [PATCH 05/11] Disable tests for Linux X64 --- build.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index dfda61d7..8e51610b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -54,3 +54,9 @@ configureLinting(lintPaths) apiValidation { ignoredProjects += setOf("elasticurl") } + +tasks.withType { + if (name.toLowerCase().contains("linuxx64", ignoreCase = true)) { + enabled = false + } +} From 02ad3f1b9c8d568a8c213b34b376e60f5e9974f0 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 19 Oct 2023 18:21:43 -0400 Subject: [PATCH 06/11] Disable tests for Linux X64g --- aws-crt-kotlin/build.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aws-crt-kotlin/build.gradle.kts b/aws-crt-kotlin/build.gradle.kts index cdb9a699..7566c0eb 100644 --- a/aws-crt-kotlin/build.gradle.kts +++ b/aws-crt-kotlin/build.gradle.kts @@ -123,3 +123,9 @@ kotlin { // Publishing configurePublishing("aws-crt-kotlin") + +tasks.withType { + if (name.toLowerCase().contains("linuxx64", ignoreCase = true)) { + enabled = false + } +} From 1fc63601280fdbb048545c6b95de1c4e0a011ed4 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 20 Oct 2023 09:58:38 -0400 Subject: [PATCH 07/11] Make tests a no-op on Native --- aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt b/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt index 19ad86e9..2f5d6c10 100644 --- a/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt +++ b/aws-crt-kotlin/native/test/aws/sdk/kotlin/crt/UtilsNative.kt @@ -11,7 +11,5 @@ import kotlinx.coroutines.runBlocking import kotlin.coroutines.CoroutineContext actual fun runSuspendTest(context: CoroutineContext, block: suspend CoroutineScope.() -> T): T { - return runBlocking(context) { - block() - } + TODO("Not yet implemented") } From 50014451161a77ed191cfd1727b9a40cd77c1609 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 20 Oct 2023 09:59:03 -0400 Subject: [PATCH 08/11] revert 'Disable tests for Linux X64 --- aws-crt-kotlin/build.gradle.kts | 6 ------ build.gradle.kts | 6 ------ 2 files changed, 12 deletions(-) diff --git a/aws-crt-kotlin/build.gradle.kts b/aws-crt-kotlin/build.gradle.kts index 7566c0eb..cdb9a699 100644 --- a/aws-crt-kotlin/build.gradle.kts +++ b/aws-crt-kotlin/build.gradle.kts @@ -123,9 +123,3 @@ kotlin { // Publishing configurePublishing("aws-crt-kotlin") - -tasks.withType { - if (name.toLowerCase().contains("linuxx64", ignoreCase = true)) { - enabled = false - } -} diff --git a/build.gradle.kts b/build.gradle.kts index 8e51610b..dfda61d7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -54,9 +54,3 @@ configureLinting(lintPaths) apiValidation { ignoredProjects += setOf("elasticurl") } - -tasks.withType { - if (name.toLowerCase().contains("linuxx64", ignoreCase = true)) { - enabled = false - } -} From 08d3f4984495ae48137c53f5b3000fbbe6980c48 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 20 Oct 2023 10:37:28 -0400 Subject: [PATCH 09/11] Disable linuxX64Test --- aws-crt-kotlin/build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws-crt-kotlin/build.gradle.kts b/aws-crt-kotlin/build.gradle.kts index cdb9a699..e8ba878c 100644 --- a/aws-crt-kotlin/build.gradle.kts +++ b/aws-crt-kotlin/build.gradle.kts @@ -123,3 +123,7 @@ kotlin { // Publishing configurePublishing("aws-crt-kotlin") + +tasks.named("linuxX64Test") { + enabled = false +} \ No newline at end of file From 28212ca8d2f5d8541c206e109ca952feb9af478d Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 20 Oct 2023 10:54:05 -0400 Subject: [PATCH 10/11] Update test steps to only run jvmTest --- builder.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder.json b/builder.json index 3cd6c359..9b9ff4d3 100644 --- a/builder.json +++ b/builder.json @@ -19,7 +19,7 @@ ], "test_steps": [ "{gradlew} apiCheck", - "{gradlew} test allTests" + "{gradlew} test jvmTest" ], "targets": { "linux": { @@ -31,7 +31,7 @@ ], "!test_steps": [ "{gradlew} apiCheck", - "{gradlew} test allTests -Dlibcrypto.path={libcrypto_path}" + "{gradlew} test jvmTest -Dlibcrypto.path={libcrypto_path}" ] } } From f29c0047d1ec0c50f526253958703c4c6e6dc4b6 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 20 Oct 2023 10:54:34 -0400 Subject: [PATCH 11/11] Revert disable linuxX64Test --- aws-crt-kotlin/build.gradle.kts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/aws-crt-kotlin/build.gradle.kts b/aws-crt-kotlin/build.gradle.kts index e8ba878c..cdb9a699 100644 --- a/aws-crt-kotlin/build.gradle.kts +++ b/aws-crt-kotlin/build.gradle.kts @@ -123,7 +123,3 @@ kotlin { // Publishing configurePublishing("aws-crt-kotlin") - -tasks.named("linuxX64Test") { - enabled = false -} \ No newline at end of file