diff --git a/gradle.properties b/gradle.properties index 7c0a9f0d7d2..1f20328f8f8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,2 @@ smithyVersion=1.62.0 -smithyGradleVersion=1.3.0 -smithyPluginVersion=0.7.0 \ No newline at end of file +smithyGradleVersion=1.3.0 \ No newline at end of file diff --git a/smithy-typescript-protocol-test-codegen/build.gradle.kts b/smithy-typescript-protocol-test-codegen/build.gradle.kts index 6f4a5732b61..8cebaf6716c 100644 --- a/smithy-typescript-protocol-test-codegen/build.gradle.kts +++ b/smithy-typescript-protocol-test-codegen/build.gradle.kts @@ -1,4 +1,4 @@ -import software.amazon.smithy.gradle.tasks.SmithyBuild +import software.amazon.smithy.gradle.tasks.SmithyBuildTask val smithyVersion: String by project @@ -15,8 +15,10 @@ buildscript { } plugins { - val smithyPluginVersion: String by project - id("software.amazon.smithy").version(smithyPluginVersion) + `java-library` + + val smithyGradleVersion: String by project + id("software.amazon.smithy.gradle.smithy-base").version(smithyGradleVersion) } dependencies { @@ -24,14 +26,15 @@ dependencies { implementation(project(":smithy-typescript-codegen")) } -// This project doesn't produce a JAR. -tasks["jar"].enabled = false - -tasks["smithyBuildJar"].enabled = false - -tasks.register("buildSdk") { - addRuntimeClasspath = true +val buildSdk = tasks.register("buildSdk") { + models.set(files("model/")) + smithyBuildConfigs.set(files("smithy-build.json")) } // Run the `buildSdk` automatically. -tasks["build"].finalizedBy(tasks["buildSdk"]) +tasks["build"].finalizedBy(buildSdk) + +tasks.register("copyOutput") { + into(layout.buildDirectory.dir("model")) + from(buildSdk.map { it.getPluginProjectionDirectory("source", "model") }) +} \ No newline at end of file diff --git a/smithy-typescript-protocol-test-codegen/model/my-local-model/main.smithy b/smithy-typescript-protocol-test-codegen/model/my-local-model/main.smithy index a7e7fd3cf68..ce9a5189b9c 100644 --- a/smithy-typescript-protocol-test-codegen/model/my-local-model/main.smithy +++ b/smithy-typescript-protocol-test-codegen/model/my-local-model/main.smithy @@ -7,8 +7,8 @@ use smithy.protocols#rpcv2Cbor @rpcv2Cbor @documentation("xyz interfaces") service XYZService { - version: "1.0", - operations : [ + version: "1.0" + operations: [ GetNumbers ] } @@ -18,9 +18,9 @@ operation GetNumbers { input: GetNumbersRequest output: GetNumbersResponse errors: [ - CodedThrottlingError, - MysteryThrottlingError, - RetryableError, + CodedThrottlingError + MysteryThrottlingError + RetryableError HaltError ] } @@ -47,8 +47,8 @@ structure CodedThrottlingError {} structure MysteryThrottlingError {} @error("client") -@retryable() +@retryable structure RetryableError {} @error("client") -structure HaltError {} \ No newline at end of file +structure HaltError {}