Skip to content

Commit

Permalink
chore(codegen): move smithy version settings to gradle properties (#4035
Browse files Browse the repository at this point in the history
)
  • Loading branch information
srchase authored Oct 12, 2022
1 parent ad99b66 commit 4e6df5e
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 19 deletions.
2 changes: 0 additions & 2 deletions codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ allprojects {
version = "0.12.0"
}

extra["smithyVersion"] = "[1.25.2,1.26.0["

// The root project doesn't produce a JAR.
tasks["jar"].enabled = false

Expand Down
11 changes: 8 additions & 3 deletions codegen/generic-client-test-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,26 @@

import software.amazon.smithy.gradle.tasks.SmithyBuild

val smithyVersion: String by project

buildscript {
val smithyVersion: String by project

repositories {
mavenCentral()
}
dependencies {
"classpath"("software.amazon.smithy:smithy-cli:${rootProject.extra["smithyVersion"]}")
"classpath"("software.amazon.smithy:smithy-cli:$smithyVersion")
}
}

plugins {
id("software.amazon.smithy") version "0.6.0"
val smithyGradleVersion: String by project
id("software.amazon.smithy").version(smithyGradleVersion)
}

dependencies {
implementation("software.amazon.smithy:smithy-aws-protocol-tests:${rootProject.extra["smithyVersion"]}")
implementation("software.amazon.smithy:smithy-aws-protocol-tests:$smithyVersion")
implementation(project(":smithy-aws-typescript-codegen"))
}

Expand Down
2 changes: 2 additions & 0 deletions codegen/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
smithyVersion=[1.25.0,1.26.0[
smithyGradleVersion=0.6.0
11 changes: 8 additions & 3 deletions codegen/protocol-test-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,26 @@

import software.amazon.smithy.gradle.tasks.SmithyBuild

val smithyVersion: String by project

buildscript {
val smithyVersion: String by project

repositories {
mavenCentral()
}
dependencies {
"classpath"("software.amazon.smithy:smithy-cli:${rootProject.extra["smithyVersion"]}")
"classpath"("software.amazon.smithy:smithy-cli:$smithyVersion")
}
}

plugins {
id("software.amazon.smithy") version "0.6.0"
val smithyGradleVersion: String by project
id("software.amazon.smithy").version(smithyGradleVersion)
}

dependencies {
implementation("software.amazon.smithy:smithy-aws-protocol-tests:${rootProject.extra["smithyVersion"]}")
implementation("software.amazon.smithy:smithy-aws-protocol-tests:$smithyVersion")
implementation(project(":smithy-aws-typescript-codegen"))
}

Expand Down
11 changes: 8 additions & 3 deletions codegen/sdk-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,24 @@ import software.amazon.smithy.aws.traits.ServiceTrait
import java.util.stream.Stream
import kotlin.streams.toList

val smithyVersion: String by project

buildscript {
val smithyVersion: String by project

repositories {
mavenLocal()
mavenCentral()
}
dependencies {
"classpath"("software.amazon.smithy:smithy-cli:${rootProject.extra["smithyVersion"]}")
"classpath"("software.amazon.smithy:smithy-aws-traits:${rootProject.extra["smithyVersion"]}")
"classpath"("software.amazon.smithy:smithy-cli:$smithyVersion")
"classpath"("software.amazon.smithy:smithy-aws-traits:$smithyVersion")
}
}

plugins {
id("software.amazon.smithy") version "0.6.0"
val smithyGradleVersion: String by project
id("software.amazon.smithy").version(smithyGradleVersion)
}

dependencies {
Expand Down
20 changes: 12 additions & 8 deletions codegen/smithy-aws-typescript-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,27 @@ description = "Generates TypeScript code for AWS protocols from Smithy models"
extra["displayName"] = "Smithy :: AWS :: Typescript :: Codegen"
extra["moduleName"] = "software.amazon.smithy.aws.typescript.codegen"

val smithyVersion: String by project

buildscript {
val smithyVersion: String by project

repositories {
mavenCentral()
}
dependencies {
classpath("software.amazon.smithy:smithy-model:${rootProject.extra["smithyVersion"]}")
classpath("software.amazon.smithy:smithy-model:$smithyVersion")
}
}

dependencies {
api("software.amazon.smithy:smithy-aws-cloudformation-traits:${rootProject.extra["smithyVersion"]}")
api("software.amazon.smithy:smithy-aws-traits:${rootProject.extra["smithyVersion"]}")
api("software.amazon.smithy:smithy-waiters:${rootProject.extra["smithyVersion"]}")
api("software.amazon.smithy:smithy-aws-iam-traits:${rootProject.extra["smithyVersion"]}")
api("software.amazon.smithy:smithy-protocol-test-traits:${rootProject.extra["smithyVersion"]}")
api("software.amazon.smithy:smithy-model:${rootProject.extra["smithyVersion"]}")
api("software.amazon.smithy:smithy-rules-engine:${rootProject.extra["smithyVersion"]}")
api("software.amazon.smithy:smithy-aws-cloudformation-traits:$smithyVersion")
api("software.amazon.smithy:smithy-aws-traits:$smithyVersion")
api("software.amazon.smithy:smithy-waiters:$smithyVersion")
api("software.amazon.smithy:smithy-aws-iam-traits:$smithyVersion")
api("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion")
api("software.amazon.smithy:smithy-model:$smithyVersion")
api("software.amazon.smithy:smithy-rules-engine:$smithyVersion")
api("software.amazon.smithy.typescript:smithy-typescript-codegen:0.12.0")
}

Expand Down

0 comments on commit 4e6df5e

Please sign in to comment.