Skip to content

Commit 108b551

Browse files
kstichsrchase
authored andcommitted
Move Smithy version settings to gradle properties (smithy-lang#611)
1 parent 3ea05f6 commit 108b551

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ allprojects {
2828
version = "0.12.0"
2929
}
3030

31-
extra["smithyVersion"] = "[1.25.0,1.26.0["
32-
3331
// The root project doesn't produce a JAR.
3432
tasks["jar"].enabled = false
3533

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
smithyVersion=[1.25.0,1.26.0[
2+
smithyGradleVersion=0.6.0

smithy-typescript-codegen-test/build.gradle.kts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,23 @@ extra["moduleName"] = "software.amazon.smithy.typescript.codegen.test"
1818

1919
tasks["jar"].enabled = false
2020

21+
val smithyVersion: String by project
22+
2123
buildscript {
24+
val smithyVersion: String by project
25+
2226
repositories {
2327
mavenCentral()
2428
}
2529
dependencies {
26-
"classpath"("software.amazon.smithy:smithy-cli:${rootProject.extra["smithyVersion"]}")
30+
"classpath"("software.amazon.smithy:smithy-cli:$smithyVersion")
2731
}
2832
}
2933

30-
3134
plugins {
32-
id("software.amazon.smithy").version("0.6.0")
35+
val smithyGradleVersion: String by project
36+
37+
id("software.amazon.smithy").version(smithyGradleVersion)
3338
}
3439

3540
repositories {
@@ -39,6 +44,6 @@ repositories {
3944

4045
dependencies {
4146
implementation(project(":smithy-typescript-codegen"))
42-
implementation("software.amazon.smithy:smithy-waiters:${rootProject.extra["smithyVersion"]}")
43-
implementation("software.amazon.smithy:smithy-protocol-test-traits:${rootProject.extra["smithyVersion"]}")
47+
implementation("software.amazon.smithy:smithy-waiters:$smithyVersion")
48+
implementation("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion")
4449
}

smithy-typescript-codegen/build.gradle.kts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,22 @@ description = "Generates TypeScript code from Smithy models"
1717
extra["displayName"] = "Smithy :: Typescript :: Codegen"
1818
extra["moduleName"] = "software.amazon.smithy.typescript.codegen"
1919

20+
val smithyVersion: String by project
21+
2022
buildscript {
23+
val smithyVersion: String by project
24+
2125
repositories {
2226
mavenCentral()
2327
}
2428
dependencies {
25-
"classpath"("software.amazon.smithy:smithy-cli:${rootProject.extra["smithyVersion"]}")
29+
"classpath"("software.amazon.smithy:smithy-cli:$smithyVersion")
2630
}
2731
}
2832

29-
3033
dependencies {
31-
api("software.amazon.smithy:smithy-codegen-core:${rootProject.extra["smithyVersion"]}")
32-
api("software.amazon.smithy:smithy-rules-engine:${rootProject.extra["smithyVersion"]}")
33-
api("software.amazon.smithy:smithy-waiters:${rootProject.extra["smithyVersion"]}")
34-
implementation("software.amazon.smithy:smithy-protocol-test-traits:${rootProject.extra["smithyVersion"]}")
34+
api("software.amazon.smithy:smithy-codegen-core:$smithyVersion")
35+
api("software.amazon.smithy:smithy-rules-engine:$smithyVersion")
36+
api("software.amazon.smithy:smithy-waiters:$smithyVersion")
37+
implementation("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion")
3538
}

0 commit comments

Comments
 (0)