Skip to content

Commit 887b6cb

Browse files
committed
Merge branch 'feat-ddb-mapper' into ddbmapper-filter-expressions-codegen
2 parents f3929f5 + 997a9f6 commit 887b6cb

File tree

22 files changed

+275
-126
lines changed

22 files changed

+275
-126
lines changed

.brazil.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
22
"dependencies": {
3+
"org.jetbrains.kotlin:kotlin-gradle-plugin:2.*": "KotlinGradlePlugin-2.x",
34
"org.jetbrains.kotlin:kotlin-stdlib-common:2.*.*": "KotlinStdlibCommon-2.x",
45
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.*.*": "KotlinStdlibJdk8-2.x",
56
"org.jetbrains.kotlin:kotlin-stdlib:2.*.*": "KotlinStdlib-2.x",
67
"org.jetbrains.kotlinx:atomicfu:0.*.*": "Atomicfu-0.x",
78
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.*": "KotlinxCoroutinesCoreJvm-1.x",
8-
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.*": "KotlinxCoroutinesJdk8-1.x"
9+
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.*": "KotlinxCoroutinesJdk8-1.x",
10+
"com.google.devtools.ksp:symbol-processing-api:2.*": "Maven-com-google-devtools-ksp_symbol-processing-api-2.x",
11+
"com.google.devtools.ksp:symbol-processing-gradle-plugin:2.*": "Maven-com-google-devtools-ksp_symbol-processing-gradle-plugin-2.x"
912
},
1013
"packageHandlingRules": {
1114
"versioning": {
1215
"defaultVersionLayout": "{MAJOR}.0.x"
1316
},
1417
"ignore": [
1518
"aws.sdk.kotlin:bom",
16-
"aws.sdk.kotlin.crt:aws-crt-kotlin-android",
1719
"aws.sdk.kotlin:testing",
1820
"aws.sdk.kotlin:version-catalog"
1921
],

aws-runtime/aws-http/api/aws-http.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ public final class aws/sdk/kotlin/runtime/http/interceptors/AddUserAgentMetadata
141141
}
142142

143143
public final class aws/sdk/kotlin/runtime/http/interceptors/AwsBusinessMetric : java/lang/Enum, aws/smithy/kotlin/runtime/businessmetrics/BusinessMetric {
144+
public static final field DDB_MAPPER Laws/sdk/kotlin/runtime/http/interceptors/AwsBusinessMetric;
144145
public static final field S3_EXPRESS_BUCKET Laws/sdk/kotlin/runtime/http/interceptors/AwsBusinessMetric;
145146
public static fun getEntries ()Lkotlin/enums/EnumEntries;
146147
public fun getIdentifier ()Ljava/lang/String;

aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ private fun formatMetrics(metrics: MutableSet<String>): String {
6464
@InternalApi
6565
public enum class AwsBusinessMetric(public override val identifier: String) : BusinessMetric {
6666
S3_EXPRESS_BUCKET("J"),
67+
DDB_MAPPER("d"),
6768
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ksp-version = "2.0.10-1.0.24" # Keep in sync with kotlin-version
44

55
dokka-version = "1.9.10"
66

7-
aws-kotlin-repo-tools-version = "0.4.10"
7+
aws-kotlin-repo-tools-version = "0.4.11"
88

99
# libs
1010
coroutines-version = "1.9.0"

hll/build.gradle.kts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import aws.sdk.kotlin.gradle.dsl.configurePublishing
77
import aws.sdk.kotlin.gradle.kmp.*
8+
import aws.smithy.kotlin.runtime.InternalApi
9+
import aws.smithy.kotlin.runtime.text.ensureSuffix
810
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
911

1012
description = "High-level libraries for the AWS SDK for Kotlin"
@@ -31,22 +33,32 @@ val optinAnnotations = listOf(
3133
"kotlin.RequiresOptIn",
3234
)
3335

36+
@OptIn(InternalApi::class)
37+
val hllPreviewVersion = if (sdkVersion.contains("-SNAPSHOT")) { // e.g. 1.3.29-beta-SNAPSHOT
38+
sdkVersion
39+
.removeSuffix("-SNAPSHOT")
40+
.ensureSuffix("-beta-SNAPSHOT")
41+
} else {
42+
sdkVersion.ensureSuffix("-beta") // e.g. 1.3.29-beta
43+
}
44+
45+
subprojects {
46+
group = "aws.sdk.kotlin"
47+
version = hllPreviewVersion
48+
configurePublishing("aws-sdk-kotlin")
49+
}
50+
3451
subprojects {
3552
if (!needsKmpConfigured) {
3653
return@subprojects
3754
}
3855

39-
group = "aws.sdk.kotlin"
40-
version = sdkVersion
41-
4256
apply {
4357
plugin("org.jetbrains.kotlin.multiplatform")
4458
plugin("org.jetbrains.dokka")
4559
plugin(libraries.plugins.aws.kotlin.repo.tools.kmp.get().pluginId)
4660
}
4761

48-
configurePublishing("aws-sdk-kotlin")
49-
5062
kotlin {
5163
explicitApi()
5264

@@ -94,7 +106,6 @@ apiValidation {
94106

95107
ignoredProjects += listOf(
96108
"hll-codegen",
97-
"dynamodb-mapper-annotation-processor-test",
98109
"dynamodb-mapper-codegen",
99110
"dynamodb-mapper-ops-codegen",
100111
"dynamodb-mapper-schema-codegen",

hll/dynamodb-mapper/dynamodb-mapper-codegen/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ kotlin {
3030
}
3131
}
3232

33-
val sdkVersion: String by project
34-
group = "aws.sdk.kotlin"
35-
version = sdkVersion
36-
3733
val sourcesJar by tasks.creating(Jar::class) {
3834
group = "publishing"
3935
description = "Assembles Kotlin sources jar"

hll/dynamodb-mapper/dynamodb-mapper-codegen/src/main/kotlin/aws/sdk/kotlin/hll/dynamodbmapper/codegen/model/MapperPkg.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public object MapperPkg {
1212
public object Hl {
1313
public val Base: String = "aws.sdk.kotlin.hll.dynamodbmapper"
1414
public val Annotations: String = "$Base.annotations"
15+
public val Internal: String = "$Base.internal"
1516
public val Items: String = "$Base.items"
1617
public val Model: String = "$Base.model"
1718
public val Ops: String = "$Base.operations"

hll/dynamodb-mapper/dynamodb-mapper-codegen/src/main/kotlin/aws/sdk/kotlin/hll/dynamodbmapper/codegen/model/MapperTypes.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ public object MapperTypes {
2929

3030
public object Internal {
3131
public val FilterImpl: TypeRef = TypeRef(MapperPkg.Hl.Expressions.Internal, "FilterImpl")
32-
public val ParameterizingExpressionVisitor: TypeRef = TypeRef(MapperPkg.Hl.Expressions.Internal, "ParameterizingExpressionVisitor")
32+
public val ParameterizingExpressionVisitor: TypeRef =
33+
TypeRef(MapperPkg.Hl.Expressions.Internal, "ParameterizingExpressionVisitor")
3334
public val toExpression: TypeRef = TypeRef(MapperPkg.Hl.Expressions.Internal, "toExpression")
3435
}
3536
}
3637

38+
public object Internal {
39+
public val withWrappedClient: TypeRef = TypeRef(MapperPkg.Hl.Internal, "withWrappedClient")
40+
}
41+
3742
public object Items {
3843
public fun itemSchema(typeVar: String): TypeRef =
3944
TypeRef(MapperPkg.Hl.Items, "ItemSchema", genericArgs = listOf(TypeVar(typeVar)))

hll/dynamodb-mapper/dynamodb-mapper-ops-codegen/src/main/kotlin/aws/sdk/kotlin/hll/dynamodbmapper/codegen/operations/rendering/OperationRenderer.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ internal class OperationRenderer(
8181
}
8282
write("schema) },")
8383

84-
write("lowLevelInvoke = spec.mapper.client::#L,", operation.methodName)
84+
withBlock("lowLevelInvoke = { lowLevelReq ->", "},") {
85+
withBlock("spec.mapper.client.#T { client ->", "}", MapperTypes.Internal.withWrappedClient) {
86+
write("client.#L(lowLevelReq)", operation.methodName)
87+
}
88+
}
89+
8590
write("deserialize = #L::convert,", operation.response.lowLevelName)
8691
write("interceptors = spec.mapper.config.interceptors,")
8792
}

hll/dynamodb-mapper/dynamodb-mapper-schema-codegen/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ tasks.test {
4949
}
5050
}
5151

52-
val sdkVersion: String by project
53-
group = "aws.sdk.kotlin"
54-
version = sdkVersion
55-
5652
val sourcesJar by tasks.creating(Jar::class) {
5753
group = "publishing"
5854
description = "Assembles Kotlin sources jar"

0 commit comments

Comments
 (0)