Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a2347c7
feat: add `toBuilder` and S3 Express signing algorithm (#90)
lauzadis Feb 9, 2024
9347977
chore: release 0.8.5
aws-sdk-kotlin-ci Feb 9, 2024
c693020
chore: bump snapshot version to 0.8.6-SNAPSHOT
aws-sdk-kotlin-ci Feb 9, 2024
4524719
feat: artifact size metrics (#102)
0marperez Apr 29, 2024
68cbd08
misc: repo tools version bump (#104)
0marperez May 2, 2024
5c6c89d
misc: version bump repo tools (#105)
0marperez May 14, 2024
514f214
misc: upgrade to ktlint v1.3.0 (#108)
lauzadis Jun 27, 2024
c3bbb58
misc: upgrade to latest version of aws-crt-java (#109)
lauzadis Jun 28, 2024
7a2ef49
chore: release 0.8.6
aws-sdk-kotlin-ci Jun 28, 2024
c153a28
chore: bump snapshot version to 0.8.7-SNAPSHOT
aws-sdk-kotlin-ci Jun 28, 2024
a960459
misc: Upgrade to Kotlin 2.0.0 (#107)
lauzadis Jul 25, 2024
4da3193
chore: release 0.8.7
aws-sdk-kotlin-ci Jul 25, 2024
d0e62cc
chore: bump snapshot version to 0.8.8-SNAPSHOT
aws-sdk-kotlin-ci Jul 25, 2024
b68f273
misc: prune transformation config (#110)
lauzadis Aug 2, 2024
cc75732
misc: upgrade to Kotlin 2.0.10 (#111)
lauzadis Aug 6, 2024
b5e3868
chore: release 0.8.8
aws-sdk-kotlin-ci Aug 6, 2024
0978cda
chore: bump snapshot version to 0.8.9-SNAPSHOT
aws-sdk-kotlin-ci Aug 6, 2024
016c8a9
misc: upgrade to kotlinx.coroutines 1.9.0 (#112)
lauzadis Sep 18, 2024
83832e6
chore: release 0.8.9
aws-sdk-kotlin-ci Sep 18, 2024
2cbd075
chore: bump snapshot version to 0.8.10-SNAPSHOT
aws-sdk-kotlin-ci Sep 18, 2024
117246f
misc: Upgrade Kotlin version (#113)
lauzadis Oct 15, 2024
db6a44a
misc: upgrade aws-crt-java version (#114)
lauzadis Oct 15, 2024
0ede180
misc: upgrade aws-kotlin-repo-tools version (#115)
lauzadis Oct 16, 2024
9705451
chore: release 0.8.10
aws-sdk-kotlin-ci Oct 16, 2024
4388249
chore: bump snapshot version to 0.8.11-SNAPSHOT
aws-sdk-kotlin-ci Oct 16, 2024
886798f
Merge branch 'main' of github.com:awslabs/aws-crt-kotlin into kn-main
lauzadis Oct 17, 2024
b9b99f7
Fix merge
lauzadis Oct 18, 2024
69d9c7d
ktlint
lauzadis Oct 22, 2024
d254084
git submodule update
lauzadis Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions .brazil.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"dependencies": {
"org.jetbrains.kotlin:kotlin-stdlib-common:1.9.*": "KotlinStdlibCommon-1.9.x",
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.*": "KotlinStdlibJdk8-1.9.x",
"org.jetbrains.kotlin:kotlin-stdlib:1.9.*": "KotlinStdlib-1.9.x",
"org.jetbrains.kotlinx:atomicfu-jvm:0.23.1": "AtomicfuJvm-0.23.1",
"org.jetbrains.kotlinx:atomicfu:0.23.1": "Atomicfu-0.23.1",
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.*": "KotlinxCoroutinesCoreJvm-1.7.x",
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.*": "KotlinxCoroutinesCore-1.7.x",
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.7.*": "KotlinxCoroutinesJdk8-1.7.x",
"org.jetbrains.kotlin:kotlin-stdlib:2.0.*": "KotlinStdlib-2.x",
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.*": "KotlinxCoroutinesCoreJvm-1.x",
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.*": "KotlinxCoroutinesJdk8-1.x",
"software.amazon.awssdk.crt:aws-crt:0.*": "Aws-crt-java-1.0.x"
},
"packageHandlingRules": {
Expand All @@ -21,13 +16,6 @@
"aws.sdk.kotlin.crt:aws-crt-kotlin-android"
],
"resolvesConflictDependencies": {
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.*": [
"KotlinStdlibCommon-1.9.x",
"KotlinStdlibJdk8-1.9.x"
],
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.7.*": [
"KotlinStdlibJdk8-1.9.x"
]
}
}
}
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[*.{kt,kts}]
ktlint_code_style = intellij_idea

# ktlint rules to disable
ktlint_standard_no-wildcard-imports = disabled
ktlint_standard_filename = disabled
ktlint_standard_backing-property-naming = disabled

# enable trailing commas per JetBrains recommendation
# (https://kotlinlang.org/docs/coding-conventions.html#trailing-commas)
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/artifact-size-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Artifact Size Metrics
on:
pull_request:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
branches: [ main ]
release:
types: [published]

permissions:
id-token: write
contents: read
pull-requests: write

jobs:
release-metrics:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Generate Artifact Size Metrics
run: ./gradlew artifactSizeMetrics
- name: Save Artifact Size Metrics
run: ./gradlew saveArtifactSizeMetrics -Prelease=${{ github.event.release.tag_name }}
- name: Put Artifact Size Metrics in CloudWatch
run: ./gradlew putArtifactSizeMetricsInCloudWatch -Prelease=${{ github.event.release.tag_name }}
size-check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Generate Artifact Size Metrics
run: ./gradlew artifactSizeMetrics
- name: Analyze Artifact Size Metrics
run: ./gradlew analyzeArtifactSizeMetrics
- name: Show Results
uses: actions/github-script@v7
with:
script: |
const getComments =
`query {
repository(owner:"${context.repo.owner}", name:"${context.repo.repo}"){
pullRequest(number: ${context.issue.number}) {
id
comments(last:100) {
nodes {
id
body
author {
login
}
isMinimized
}
}
}
}
}`

const response = await github.graphql(getComments)
const comments = response.repository.pullRequest.comments.nodes

const mutations = comments
.filter(comment => comment.author.login == 'github-actions' && !comment.isMinimized && comment.body.startsWith('Affected Artifacts'))
.map(comment =>
github.graphql(
`mutation {
minimizeComment(input:{subjectId:"${comment.id}", classifier:OUTDATED}){
clientMutationId
}
}`
)
)
await Promise.all(mutations)

const fs = require('node:fs')
const comment = fs.readFileSync('build/reports/metrics/artifact-analysis.md', 'utf8')

const writeComment =
`mutation {
addComment(input:{body:"""${comment}""", subjectId:"${response.repository.pullRequest.id}"}){
clientMutationId
}
}`

await github.graphql(writeComment)

- name: Evaluate
if: ${{ !contains(github.event.pull_request.labels.*.name, 'acknowledge-artifact-size-increase') }}
run: |
cd build/reports/metrics
cat has-significant-change.txt | grep false || {
echo An artifact increased in size by more than allowed or a new artifact was created.
echo If this is expected please add the 'acknowledge-artifact-size-increase' label to this pull request.
exit 1
}
17 changes: 17 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dependabot Dependency Submission

on:
push:
branches: [ main ]

permissions:
contents: write

jobs:
dependency-submission:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ build/
*.iml
.idea/
local.properties
*.klib
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## [0.8.10] - 10/16/2024

### Miscellaneous
* Upgrade to Kotlin 2.0.21
* Upgrade aws-crt-java to 0.31.3

## [0.8.9] - 09/18/2024

### Miscellaneous
* Upgrade to kotlinx.coroutines 1.9.0

## [0.8.8] - 08/06/2024

### Miscellaneous
* Upgrade to Kotlin 2.0.10
* Upgrade to aws-crt-java 0.30.5

## [0.8.7] - 07/25/2024

### Miscellaneous
* Upgrade to Kotlin 2.0.0

## [0.8.6] - 06/28/2024

### Miscellaneous
* Upgrade to aws-crt-java v0.29.25
* Upgrade to ktlint v1.3.0

## [0.8.5] - 02/09/2024

### Features
* Add SIGV4_S3EXPRESS signing algorithm and AwsSigningConfig.toBuilder function

## [0.8.4] - 01/10/2024

### Features
Expand Down
2 changes: 2 additions & 0 deletions aws-crt-kotlin/api/android/aws-crt-kotlin.api
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,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 final field SIGV4_S3EXPRESS 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;
Expand All @@ -345,6 +346,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningConfig {
public final fun getSignedBodyHeader ()Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType;
public final fun getSignedBodyValue ()Ljava/lang/String;
public final fun getUseDoubleUriEncode ()Z
public final fun toBuilder ()Laws/sdk/kotlin/crt/auth/signing/AwsSigningConfig$Builder;
}

public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningConfig$Builder {
Expand Down
3 changes: 3 additions & 0 deletions aws-crt-kotlin/api/aws-crt-kotlin.api
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,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 final field SIGV4_S3EXPRESS 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;
Expand All @@ -345,6 +346,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningConfig {
public final fun getSignedBodyHeader ()Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType;
public final fun getSignedBodyValue ()Ljava/lang/String;
public final fun getUseDoubleUriEncode ()Z
public final fun toBuilder ()Laws/sdk/kotlin/crt/auth/signing/AwsSigningConfig$Builder;
}

public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningConfig$Builder {
Expand Down Expand Up @@ -505,6 +507,7 @@ public final class aws/sdk/kotlin/crt/http/HttpClientConnectionManagerOptionsBui

public final class aws/sdk/kotlin/crt/http/HttpException : aws/sdk/kotlin/crt/CrtRuntimeException {
public fun <init> (I)V
public fun getErrorCode ()I
}

public final class aws/sdk/kotlin/crt/http/HttpHeader {
Expand Down
2 changes: 2 additions & 0 deletions aws-crt-kotlin/api/jvm/aws-crt-kotlin.api
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,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 final field SIGV4_S3EXPRESS 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;
Expand All @@ -345,6 +346,7 @@ public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningConfig {
public final fun getSignedBodyHeader ()Laws/sdk/kotlin/crt/auth/signing/AwsSignedBodyHeaderType;
public final fun getSignedBodyValue ()Ljava/lang/String;
public final fun getUseDoubleUriEncode ()Z
public final fun toBuilder ()Laws/sdk/kotlin/crt/auth/signing/AwsSigningConfig$Builder;
}

public final class aws/sdk/kotlin/crt/auth/signing/AwsSigningConfig$Builder {
Expand Down
4 changes: 3 additions & 1 deletion aws-crt-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ kotlin {
}

tasks.withType<KotlinNativeSimulatorTest>().configureEach {
if (!HostManager.hostIsMac) { return@configureEach }
if (!HostManager.hostIsMac) {
return@configureEach
}

dependsOn("bootIosSimulatorDevice")
finalizedBy("shutdownIosSimulatorDevice")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ package aws.sdk.kotlin.crt.auth.credentials
* @return the newly-constructed credentials provider
*/
public expect class CachedCredentialsProvider internal constructor(builder: CachedCredentialsProviderBuilder) : CredentialsProvider {
public companion object
public companion object { }

override fun close()
override suspend fun getCredentials(): Credentials
override suspend fun waitForShutdown()
}

public class CachedCredentialsProviderBuilder {
Expand All @@ -43,5 +47,4 @@ public class CachedCredentialsProviderBuilder {
/**
* Construct a new credentials provider using a builder
*/
public fun CachedCredentialsProvider.Companion.build(block: CachedCredentialsProviderBuilder.() -> Unit):
CachedCredentialsProvider = CachedCredentialsProviderBuilder().apply(block).build()
public fun CachedCredentialsProvider.Companion.build(block: CachedCredentialsProviderBuilder.() -> Unit): CachedCredentialsProvider = CachedCredentialsProviderBuilder().apply(block).build()
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import aws.sdk.kotlin.crt.Closeable
/**
* Represents a producer/source of AWS credentials
*/
public interface CredentialsProvider : Closeable, AsyncShutdown {
public interface CredentialsProvider :
Closeable,
AsyncShutdown {

/**
* Request credentials from the provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ import aws.sdk.kotlin.crt.io.ClientBootstrap
*
* @return the newly-constructed credentials provider
*/
public expect class DefaultChainCredentialsProvider internal constructor(builder: DefaultChainCredentialsProviderBuilder) :
CredentialsProvider {
public expect class DefaultChainCredentialsProvider internal constructor(builder: DefaultChainCredentialsProviderBuilder) : CredentialsProvider {

public companion object
public companion object { }

override fun close()
override suspend fun getCredentials(): Credentials
override suspend fun waitForShutdown()
}

public class DefaultChainCredentialsProviderBuilder {
Expand All @@ -40,5 +43,4 @@ public class DefaultChainCredentialsProviderBuilder {
/**
* Construct a new credentials provider using a builder
*/
public fun DefaultChainCredentialsProvider.Companion.build(block: DefaultChainCredentialsProviderBuilder.() -> Unit):
DefaultChainCredentialsProvider = DefaultChainCredentialsProviderBuilder().apply(block).build()
public fun DefaultChainCredentialsProvider.Companion.build(block: DefaultChainCredentialsProviderBuilder.() -> Unit): DefaultChainCredentialsProvider = DefaultChainCredentialsProviderBuilder().apply(block).build()
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ import aws.sdk.kotlin.crt.io.TlsContext
* A credentials provider that sources credentials from an ECS environment.
*/
public expect class EcsCredentialsProvider
internal constructor(builder: EcsCredentialsProviderBuilder) : CredentialsProvider {
public companion object
internal constructor(
builder: EcsCredentialsProviderBuilder,
) : CredentialsProvider {
public companion object { }

override fun close()
override suspend fun getCredentials(): Credentials
override suspend fun waitForShutdown()
}

public class EcsCredentialsProviderBuilder {
Expand Down Expand Up @@ -50,5 +56,4 @@ public class EcsCredentialsProviderBuilder {
/**
* Construct a new ECS credentials provider using a builder.
*/
public fun EcsCredentialsProvider.Companion.build(block: EcsCredentialsProviderBuilder.() -> Unit):
EcsCredentialsProvider = EcsCredentialsProviderBuilder().apply(block).build()
public fun EcsCredentialsProvider.Companion.build(block: EcsCredentialsProviderBuilder.() -> Unit): EcsCredentialsProvider = EcsCredentialsProviderBuilder().apply(block).build()
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ import aws.sdk.kotlin.crt.io.TlsContext
* A credentials provider that uses profile files.
*/
public expect class ProfileCredentialsProvider
internal constructor(builder: ProfileCredentialsProviderBuilder) : CredentialsProvider {
public companion object
internal constructor(
builder: ProfileCredentialsProviderBuilder,
) : CredentialsProvider {
public companion object { }

override fun close()
override suspend fun getCredentials(): Credentials
override suspend fun waitForShutdown()
}

public class ProfileCredentialsProviderBuilder {
Expand Down Expand Up @@ -50,5 +56,4 @@ public class ProfileCredentialsProviderBuilder {
/**
* Construct a new credentials provider using a builder.
*/
public fun ProfileCredentialsProvider.Companion.build(block: ProfileCredentialsProviderBuilder.() -> Unit):
ProfileCredentialsProvider = ProfileCredentialsProviderBuilder().apply(block).build()
public fun ProfileCredentialsProvider.Companion.build(block: ProfileCredentialsProviderBuilder.() -> Unit): ProfileCredentialsProvider = ProfileCredentialsProviderBuilder().apply(block).build()
Loading
Loading