66import aws.sdk.kotlin.gradle.codegen.dsl.generateSmithyProjections
77import aws.sdk.kotlin.gradle.codegen.dsl.smithyKotlinPlugin
88import aws.sdk.kotlin.gradle.codegen.smithyKotlinProjectionPath
9+ import shared.CodegenTest
10+ import shared.Model
911
10- description = " AWS SDK for Kotlin codegen smoke tests integration test suite"
12+ description = " AWS SDK for Kotlin's smoke test codegen test suite"
1113
1214kotlin {
1315 sourceSets {
@@ -19,21 +21,6 @@ kotlin {
1921 }
2022}
2123
22- data class CodegenTest (
23- val name : String ,
24- val model : Model ,
25- val serviceShapeId : String ,
26- val protocolName : String? = null ,
27- )
28-
29- data class Model (
30- val fileName : String ,
31- val path : String = " src/jvmTest/resources/" ,
32- ) {
33- val file: File
34- get() = layout.projectDirectory.file(path + fileName).asFile
35- }
36-
3724val tests = listOf (
3825 CodegenTest (" successService" , Model (" smoke-tests-success.smithy" ), " smithy.kotlin.traits#SuccessService" ),
3926 CodegenTest (" failureService" , Model (" smoke-tests-failure.smithy" ), " smithy.kotlin.traits#FailureService" ),
@@ -47,7 +34,7 @@ fun configureProjections() {
4734 smithyBuild {
4835 this @Build_gradle.tests.forEach { test ->
4936 projections.register(test.name) {
50- imports = listOf (test.model.file .absolutePath)
37+ imports = listOf (layout.projectDirectory.file( test.model.path + test.model.fileName).asFile .absolutePath)
5138 smithyKotlinPlugin {
5239 serviceShapeId = test.serviceShapeId
5340 packageName = " aws.sdk.kotlin.test.${test.name.lowercase()} "
0 commit comments