Skip to content

Commit

Permalink
Small refactor to build script
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Sep 21, 2024
1 parent e0f1c95 commit c99aed9
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions codegen/smithy-ruby-codegen-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import software.amazon.smithy.utils.CaseUtils
extra["displayName"] = "Smithy :: Ruby :: Codegen :: Test"
extra["moduleName"] = "software.amazon.smithy.ruby.codegen.test"

tasks["jar"].enabled = false

plugins {
id("software.amazon.smithy").version("0.5.3")
}
Expand Down Expand Up @@ -94,6 +92,13 @@ fun forEachTestService(task: (service: ServiceDefinition) -> Unit) {
}
}

tasks["jar"].enabled = false
tasks["smithyBuildJar"].enabled = false

tasks.create<SmithyBuild>("buildSdk") {
addRuntimeClasspath = true
}

// Generates a smithy-build.json file by creating a new projection for every
// JSON file found in models/test-services. The generated smithy-build.json file is
// not committed to git since it's rebuilt each time codegen is performed.
Expand Down Expand Up @@ -156,18 +161,15 @@ tasks.register<Copy>("copyRpcv2CborGem") {
into("$buildDir/../../projections/")
}

tasks["smithyBuildJar"].enabled = false

tasks.create<SmithyBuild>("buildSdk") {
addRuntimeClasspath = true
}.dependsOn(tasks["generate-smithy-build"])

tasks["build"]
.dependsOn(tasks["buildSdk"])
.finalizedBy(
tasks["copyWhiteLabelGem"],
tasks["copyRpcv2CborGem"]
)
.dependsOn(
tasks["generate-smithy-build"],
tasks["buildSdk"]
)
.finalizedBy(
tasks["copyWhiteLabelGem"],
tasks["copyRpcv2CborGem"]
)

java.sourceSets["main"].java {
srcDirs("model", "src/main/smithy")
Expand Down

0 comments on commit c99aed9

Please sign in to comment.