Skip to content

Commit 2b91a57

Browse files
committed
update protocol test build to catch upstream change
1 parent 7fe68a2 commit 2b91a57

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

codegen/protocol-tests/build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,15 @@ dependencies {
7474
}
7575

7676
tasks.generateSmithyProjections {
77-
// ensure the generated clients use the same version of the runtime as the aws aws-runtime
78-
val smithyKotlinRuntimeVersion = libs.versions.smithy.kotlin.runtime.version.get()
7977
doFirst {
78+
val smithyKotlinRuntimeVersion = rootProject.file("../smithy-kotlin/gradle.properties")
79+
.takeIf { it.exists() }
80+
?.readLines()
81+
?.find { it.startsWith("sdkVersion=") }
82+
?.substringAfter("sdkVersion=")
83+
?.trim()
84+
?: libs.versions.smithy.kotlin.runtime.version.get()
85+
// ensure the generated clients use the same version of the runtime as the aws aws-runtime
8086
System.setProperty("smithy.kotlin.codegen.clientRuntimeVersion", smithyKotlinRuntimeVersion)
8187
}
8288
}

0 commit comments

Comments
 (0)