Skip to content

Commit 445b7fe

Browse files
author
Zelda Hessler
authored
fix: use idiomatic method of setting smithy gradle plugin version (#1995)
1 parent cdb4a3f commit 445b7fe

File tree

6 files changed

+36
-16
lines changed

6 files changed

+36
-16
lines changed

aws/sdk-adhoc-test/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ extra["moduleName"] = "software.amazon.smithy.kotlin.codegen.test"
99
tasks["jar"].enabled = false
1010

1111
plugins {
12-
val smithyGradlePluginVersion: String by project
13-
id("software.amazon.smithy").version(smithyGradlePluginVersion)
12+
id("software.amazon.smithy")
1413
}
1514

1615
val smithyVersion: String by project

aws/sdk/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ extra["moduleName"] = "software.amazon.smithy.rust.awssdk"
1515
tasks["jar"].enabled = false
1616

1717
plugins {
18-
val smithyGradlePluginVersion: String by project
19-
id("software.amazon.smithy").version(smithyGradlePluginVersion)
18+
id("software.amazon.smithy")
2019
}
2120

2221
configure<software.amazon.smithy.gradle.SmithyExtension> {

codegen-client-test/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ extra["moduleName"] = "software.amazon.smithy.kotlin.codegen.test"
99
tasks["jar"].enabled = false
1010

1111
plugins {
12-
val smithyGradlePluginVersion: String by project
13-
id("software.amazon.smithy").version(smithyGradlePluginVersion)
12+
id("software.amazon.smithy")
1413
}
1514

1615
val smithyVersion: String by project

codegen-server-test/build.gradle.kts

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ extra["moduleName"] = "software.amazon.smithy.rust.kotlin.codegen.server.test"
1010
tasks["jar"].enabled = false
1111

1212
plugins {
13-
val smithyGradlePluginVersion: String by project
14-
id("software.amazon.smithy").version(smithyGradlePluginVersion)
13+
id("software.amazon.smithy")
1514
}
1615

1716
val smithyVersion: String by project
@@ -39,28 +38,46 @@ dependencies {
3938
val allCodegenTests = "../codegen-core/common-test-models".let { commonModels ->
4039
listOf(
4140
CodegenTest("crate#Config", "naming_test_ops", imports = listOf("$commonModels/naming-obstacle-course-ops.smithy")),
42-
CodegenTest("naming_obs_structs#NamingObstacleCourseStructs", "naming_test_structs", imports = listOf("$commonModels/naming-obstacle-course-structs.smithy")),
41+
CodegenTest(
42+
"naming_obs_structs#NamingObstacleCourseStructs",
43+
"naming_test_structs",
44+
imports = listOf("$commonModels/naming-obstacle-course-structs.smithy"),
45+
),
4346
CodegenTest("com.amazonaws.simple#SimpleService", "simple", imports = listOf("$commonModels/simple.smithy")),
4447
CodegenTest(
4548
"com.amazonaws.constraints#ConstraintsService", "constraints_without_public_constrained_types",
4649
imports = listOf("$commonModels/constraints.smithy"),
4750
extraConfig = """, "codegen": { "publicConstrainedTypes": false } """,
4851
),
49-
CodegenTest("com.amazonaws.constraints#ConstraintsService", "constraints", imports = listOf("$commonModels/constraints.smithy")),
52+
CodegenTest(
53+
"com.amazonaws.constraints#ConstraintsService",
54+
"constraints",
55+
imports = listOf("$commonModels/constraints.smithy"),
56+
),
5057
CodegenTest("aws.protocoltests.restjson#RestJson", "rest_json"),
51-
CodegenTest("aws.protocoltests.restjson#RestJsonExtras", "rest_json_extras", imports = listOf("$commonModels/rest-json-extras.smithy")),
52-
CodegenTest("aws.protocoltests.restjson.validation#RestJsonValidation", "rest_json_validation",
58+
CodegenTest(
59+
"aws.protocoltests.restjson#RestJsonExtras",
60+
"rest_json_extras",
61+
imports = listOf("$commonModels/rest-json-extras.smithy"),
62+
),
63+
CodegenTest(
64+
"aws.protocoltests.restjson.validation#RestJsonValidation", "rest_json_validation",
5365
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
5466
),
5567
CodegenTest("aws.protocoltests.json10#JsonRpc10", "json_rpc10"),
5668
CodegenTest("aws.protocoltests.json#JsonProtocol", "json_rpc11"),
5769
CodegenTest("aws.protocoltests.misc#MiscService", "misc", imports = listOf("$commonModels/misc.smithy")),
58-
CodegenTest("com.amazonaws.ebs#Ebs", "ebs",
70+
CodegenTest(
71+
"com.amazonaws.ebs#Ebs", "ebs",
5972
imports = listOf("$commonModels/ebs.json"),
6073
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
6174
),
6275
CodegenTest("com.amazonaws.s3#AmazonS3", "s3"),
63-
CodegenTest("com.aws.example.rust#PokemonService", "pokemon-service-server-sdk", imports = listOf("$commonModels/pokemon.smithy", "$commonModels/pokemon-common.smithy")),
76+
CodegenTest(
77+
"com.aws.example.rust#PokemonService",
78+
"pokemon-service-server-sdk",
79+
imports = listOf("$commonModels/pokemon.smithy", "$commonModels/pokemon-common.smithy"),
80+
),
6481
)
6582
}
6683

codegen-server-test/python/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ extra["moduleName"] = "software.amazon.smithy.rust.kotlin.codegen.server.python.
1010
tasks["jar"].enabled = false
1111

1212
plugins {
13-
val smithyGradlePluginVersion: String by project
14-
id("software.amazon.smithy").version(smithyGradlePluginVersion)
13+
id("software.amazon.smithy")
1514
}
1615

1716
val smithyVersion: String by project

settings.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ include(":aws:sdk-adhoc-test")
1818
include(":aws:sdk")
1919
include(":aws:rust-runtime")
2020

21+
pluginManagement {
22+
val smithyGradlePluginVersion: String by settings
23+
plugins {
24+
id("software.amazon.smithy") version smithyGradlePluginVersion
25+
}
26+
}
27+
2128
buildscript {
2229
repositories {
2330
mavenLocal()

0 commit comments

Comments
 (0)