File tree Expand file tree Collapse file tree 2 files changed +18
-24
lines changed Expand file tree Collapse file tree 2 files changed +18
-24
lines changed Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: Apache-2.0
44 */
55import software.amazon.smithy.gradle.tasks.SmithyBuild
6+ import software.amazon.smithy.gradle.tasks.Validate as SmithyValidate
67
78plugins {
89 kotlin(" jvm" )
910 id(" software.amazon.smithy" )
1011}
1112
12- buildscript {
13- dependencies {
14- val smithyVersion: String by project
15- val smithyCliConfig = configurations.maybeCreate(" smithyCli" )
16-
17- classpath(" software.amazon.smithy:smithy-cli:$smithyVersion " )
18- smithyCliConfig(" software.amazon.smithy:smithy-cli:$smithyVersion " )
19- }
20- }
21-
2213extra.set(" skipPublish" , true )
2314
2415val optinAnnotations = listOf (" kotlin.RequiresOptIn" , " aws.smithy.kotlin.runtime.InternalApi" )
@@ -33,16 +24,22 @@ kotlin.sourceSets.getByName("main") {
3324
3425tasks[" smithyBuildJar" ].enabled = false
3526
27+ val smithyVersion: String by project
3628val codegen by configurations.creating
3729dependencies {
3830 codegen(project(" :codegen:smithy-kotlin-codegen" ))
31+ codegen(" software.amazon.smithy:smithy-cli:$smithyVersion " )
3932}
4033
4134val generateSdk = tasks.register<SmithyBuild >(" generateSdk" ) {
4235 group = " codegen"
43- classpath = configurations.getByName( " codegen" )
36+ classpath = codegen
4437 inputs.file(projectDir.resolve(" smithy-build.json" ))
45- inputs.files(configurations.getByName(" codegen" ))
38+ inputs.files(codegen)
39+ }
40+
41+ tasks.named<SmithyValidate >(" smithyValidate" ) {
42+ classpath = codegen
4643}
4744
4845tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > {
Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: Apache-2.0
44 */
55import software.amazon.smithy.gradle.tasks.SmithyBuild
6+ import software.amazon.smithy.gradle.tasks.Validate as SmithyValidate
67
78plugins {
89 kotlin(" jvm" )
910 id(" software.amazon.smithy" )
1011}
1112
12- buildscript {
13- dependencies {
14- val smithyVersion: String by project
15- val smithyCliConfig = configurations.maybeCreate(" smithyCli" )
16-
17- classpath(" software.amazon.smithy:smithy-cli:$smithyVersion " )
18- smithyCliConfig(" software.amazon.smithy:smithy-cli:$smithyVersion " )
19- }
20- }
21-
2213extra.set(" skipPublish" , true )
2314
2415val optinAnnotations = listOf (" kotlin.RequiresOptIn" , " aws.smithy.kotlin.runtime.InternalApi" )
@@ -32,16 +23,22 @@ kotlin.sourceSets.getByName("main") {
3223
3324tasks[" smithyBuildJar" ].enabled = false
3425
26+ val smithyVersion: String by project
3527val codegen by configurations.creating
3628dependencies {
3729 codegen(project(" :codegen:smithy-kotlin-codegen" ))
30+ codegen(" software.amazon.smithy:smithy-cli:$smithyVersion " )
3831}
3932
4033val generateSdk = tasks.register<SmithyBuild >(" generateSdk" ) {
4134 group = " codegen"
42- classpath = configurations.getByName( " codegen" )
35+ classpath = codegen
4336 inputs.file(projectDir.resolve(" smithy-build.json" ))
44- inputs.files(configurations.getByName(" codegen" ))
37+ inputs.files(codegen)
38+ }
39+
40+ tasks.named<SmithyValidate >(" smithyValidate" ) {
41+ classpath = codegen
4542}
4643
4744tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > {
You can’t perform that action at this time.
0 commit comments