Skip to content

Commit 32e5e63

Browse files
committed
Simplify Gradle configuration of CodegenTest
``` * Where: Build file '/Users/lauzmata/aws-sdk-kotlin/tests/codegen/checksums/build.gradle.kts' line: 14 * What went wrong: Script compilation errors: Line 14: this@Build_gradle.tests.forEach { test -> ^ Unresolved label. Line 14: this@Build_gradle.tests.forEach { test -> ^ Cannot infer type for this parameter. Specify it explicitly. Line 15: projections.register(test.name) { ^ Unresolved reference 'name'. Line 16: imports = listOf(layout.projectDirectory.file(test.model.path + test.model.fileName).asFile.absolutePath) ^ Cannot infer type for this parameter. Specify it explicitly. Line 16: imports = listOf(layout.projectDirectory.file(test.model.path + test.model.fileName).asFile.absolutePath) ^ Function invocation 'model(...)' expected. Line 16: imports = listOf(layout.projectDirectory.file(test.model.path + test.model.fileName).asFile.absolutePath) ^ Unresolved reference 'path'. Line 16: imports = listOf(layout.projectDirectory.file(test.model.path + test.model.fileName).asFile.absolutePath) ^ Cannot infer type for this parameter. Specify it explicitly. Line 16: imports = listOf(layout.projectDirectory.file(test.model.path + test.model.fileName).asFile.absolutePath) ^ Function invocation 'model(...)' expected. Line 16: imports = listOf(layout.projectDirectory.file(test.model.path + test.model.fileName).asFile.absolutePath) ^ Unresolved reference 'fileName'. Line 16: imports = listOf(layout.projectDirectory.file(test.model.path + test.model.fileName).asFile.absolutePath) ^ Unresolved reference 'asFile'. Line 18: serviceShapeId = test.serviceShapeId ^ Unresolved reference 'serviceShapeId'. Line 19: packageName = "aws.sdk.kotlin.test.${test.name.lowercase()}" ^ Unresolved reference 'name'. ```
1 parent e021d35 commit 32e5e63

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/codegen/checksums/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ import aws.sdk.kotlin.tests.codegen.Model
66

77
description = "AWS SDK for Kotlin's checksums codegen test suite"
88

9-
val tests = listOf(
10-
CodegenTest("checksums", Model("checksums.smithy"), "aws.sdk.kotlin.test#TestService"),
11-
)
12-
139
smithyBuild {
14-
this@Build_gradle.tests.forEach { test ->
10+
listOf(
11+
CodegenTest("checksums", Model("checksums.smithy"), "aws.sdk.kotlin.test#TestService"),
12+
).forEach { test ->
1513
projections.register(test.name) {
1614
imports = listOf(layout.projectDirectory.file(test.model.path + test.model.fileName).asFile.absolutePath)
1715
smithyKotlinPlugin {

0 commit comments

Comments
 (0)