Skip to content

Commit ad34f2a

Browse files
authored
misc: separate codegen version (#992)
1 parent 85932c7 commit ad34f2a

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": "cf638060-f5d7-48f2-9e68-651a11e4c033",
3+
"type": "misc",
4+
"description": "Separate codegen project versioning"
5+
}

.github/workflows/continuous-integration.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,16 @@ jobs:
102102
# TODO - JVM only
103103
cd $GITHUB_WORKSPACE/smithy-kotlin
104104
./gradlew --parallel publishToMavenLocal
105-
SMITHY_KOTLIN_VERSION=$(grep sdkVersion= gradle.properties | cut -d = -f 2)
105+
SMITHY_KOTLIN_RUNTIME_VERSION=$(grep sdkVersion= gradle.properties | cut -d = -f 2)
106+
SMITHY_KOTLIN_CODEGEN_VERSION=$(grep codegenVersion= gradle.properties | cut -d = -f 2)
106107
cd $GITHUB_WORKSPACE/aws-sdk-kotlin
107-
# replace smithy-kotlin-version to be whatever we are testing such that the protocol test projects
108-
# don't fail with a version that doesn't exist locally or in maven central. Otherwise
109-
# the generated protocol test projects will use whatever the SDK thinks the version of smithy-kotlin should be
110-
sed -i "s/smithy-kotlin-version = .*$/smithy-kotlin-version = \"$SMITHY_KOTLIN_VERSION\"/" gradle/libs.versions.toml
108+
# replace smithy-kotlin-runtime-version and smithy-kotlin-codegen-version to be
109+
# whatever we are testing such that the protocol test projects don't fail with a
110+
# version that doesn't exist locally or in maven central. Otherwise the generated
111+
# protocol test projects will use whatever the SDK thinks the version of
112+
# smithy-kotlin should be
113+
sed -i "s/smithy-kotlin-runtime-version = .*$/smithy-kotlin-runtime-version = \"$SMITHY_KOTLIN_RUNTIME_VERSION\"/" gradle/libs.versions.toml
114+
sed -i "s/smithy-kotlin-codegen-version = .*$/smithy-kotlin-codegen-version = \"$SMITHY_KOTLIN_CODEGEN_VERSION\"/" gradle/libs.versions.toml
111115
./gradlew --parallel publishToMavenLocal
112116
./gradlew test jvmTest
113117
./gradlew testAllProtocols

codegen/smithy-kotlin-codegen-testutils/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ description = "Provides common test utilities for Smithy-Kotlin code generation"
1313
extra["displayName"] = "Smithy :: Kotlin :: Codegen Utils"
1414
extra["moduleName"] = "software.amazon.smithy.kotlin.codegen.test"
1515

16-
val sdkVersion: String by project
16+
val codegenVersion: String by project
1717
group = "software.amazon.smithy.kotlin"
18-
version = sdkVersion
18+
version = codegenVersion
1919

2020
dependencies {
2121
implementation(kotlin("stdlib-jdk8"))

codegen/smithy-kotlin-codegen/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ description = "Generates Kotlin code from Smithy models"
1313
extra["displayName"] = "Smithy :: Kotlin :: Codegen"
1414
extra["moduleName"] = "software.amazon.smithy.kotlin.codegen"
1515

16-
val sdkVersion: String by project
16+
val codegenVersion: String by project
1717
group = "software.amazon.smithy.kotlin"
18-
version = sdkVersion
18+
version = codegenVersion
1919

2020
dependencies {
2121
implementation(kotlin("stdlib-jdk8"))

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ org.gradle.jvmargs=-Xmx2G -XX:MaxMetaspaceSize=1G
1010
# SDK
1111
sdkVersion=0.28.2-SNAPSHOT
1212

13+
# codegen
14+
codegenVersion=0.28.2-SNAPSHOT
15+
1316
# kotlin
1417
kotlinVersion=1.9.10

0 commit comments

Comments
 (0)