Skip to content

Commit e509449

Browse files
authored
chore: split dynamodb-mapper-codegen into two modules (#1414)
1 parent 21f1bd5 commit e509449

File tree

34 files changed

+228
-120
lines changed

34 files changed

+228
-120
lines changed

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ smithyKotlinDocBaseUrl=https://sdk.amazonaws.com/kotlin/api/smithy-kotlin/api/$s
1414
# atomicfu
1515
kotlinx.atomicfu.enableJvmIrTransformation=true
1616
# FIXME - https://github.com/Kotlin/kotlinx-atomicfu/issues/274
17-
kotlinx.atomicfu.enableNativeIrTransformation=false
17+
kotlinx.atomicfu.enableNativeIrTransformation=false
18+
19+
# https://github.com/google/ksp/blob/main/docs/ksp2.md
20+
ksp.useKSP2=true

hll/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ apiValidation {
9696
"hll-codegen",
9797
"dynamodb-mapper-annotation-processor-test",
9898
"dynamodb-mapper-codegen",
99+
"dynamodb-mapper-ops-codegen",
100+
"dynamodb-mapper-schema-codegen",
99101
"dynamodb-mapper-schema-generator-plugin-test",
100102
).filter { it in availableSubprojects } // Some projects may not be in the build depending on bootstrapping
101103
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
5+
6+
description = "DynamoDbMapper annotations"
7+
extra["displayName"] = "AWS :: SDK :: Kotlin :: HLL :: DynamoDbMapper :: Annotations"
8+
extra["moduleName"] = "aws.sdk.kotlin.hll.dynamodbmapper.annotations"

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@ plugins {
1313
}
1414

1515
dependencies {
16-
implementation(libs.ksp.api)
1716
implementation(project(":hll:hll-codegen"))
18-
implementation(project(":hll:dynamodb-mapper:dynamodb-mapper-annotations"))
19-
implementation(project(":services:dynamodb"))
20-
21-
testImplementation(libs.junit.jupiter)
22-
testImplementation(libs.junit.jupiter.params)
23-
testImplementation(libs.kotest.assertions.core.jvm)
24-
testImplementation(libs.kotlin.test.junit5)
2517
}
2618

2719
val optinAnnotations = listOf(
@@ -38,17 +30,6 @@ kotlin {
3830
}
3931
}
4032

41-
tasks.test {
42-
useJUnitPlatform()
43-
testLogging {
44-
events("passed", "skipped", "failed")
45-
showStandardStreams = true
46-
showStackTraces = true
47-
showExceptions = true
48-
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
49-
}
50-
}
51-
5233
val sdkVersion: String by project
5334
group = "aws.sdk.kotlin"
5435
version = sdkVersion

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

Lines changed: 88 additions & 86 deletions
Large diffs are not rendered by default.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
description = "DynamoDbMapper ops code generation"
7+
extra["displayName"] = "AWS :: SDK :: Kotlin :: HLL :: DynamoDbMapper :: Codegen :: Ops"
8+
extra["moduleName"] = "aws.sdk.kotlin.hll.dynamodbmapper.codegen.ops"
9+
10+
plugins {
11+
alias(libs.plugins.kotlin.jvm)
12+
}
13+
14+
dependencies {
15+
implementation(libs.ksp.api)
16+
implementation(project(":hll:hll-codegen"))
17+
implementation(project(":services:dynamodb"))
18+
implementation(project(":hll:dynamodb-mapper:dynamodb-mapper-codegen"))
19+
20+
testImplementation(libs.junit.jupiter)
21+
testImplementation(libs.junit.jupiter.params)
22+
testImplementation(libs.kotest.assertions.core.jvm)
23+
testImplementation(libs.kotlin.test.junit5)
24+
}
25+
26+
val optinAnnotations = listOf(
27+
"aws.smithy.kotlin.runtime.InternalApi",
28+
"aws.sdk.kotlin.runtime.InternalSdkApi",
29+
"kotlin.RequiresOptIn",
30+
)
31+
32+
kotlin {
33+
explicitApi()
34+
35+
sourceSets.all {
36+
optinAnnotations.forEach(languageSettings::optIn)
37+
}
38+
}
39+
40+
tasks.test {
41+
useJUnitPlatform()
42+
testLogging {
43+
events("passed", "skipped", "failed")
44+
showStandardStreams = true
45+
showStackTraces = true
46+
showExceptions = true
47+
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
48+
}
49+
}

0 commit comments

Comments
 (0)