Skip to content

Commit

Permalink
Add customizations hook (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp authored Sep 11, 2024
1 parent 6aed871 commit e0f1c95
Show file tree
Hide file tree
Showing 34 changed files with 67 additions and 3,032 deletions.
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true

$white_label_dir = 'codegen/smithy-ruby-codegen-test/build/smithyprojections/smithy-ruby-codegen-test/white-label/ruby-codegen/white_label'
$rpcv2_cbor_dir = 'codegen/smithy-ruby-codegen-test/build/smithyprojections/smithy-ruby-codegen-test/rpcv2cbor/ruby-codegen/rpcv2_cbor'
$rails_json_dir = 'codegen/smithy-ruby-rails-codegen-test/build/smithyprojections/smithy-ruby-rails-codegen-test/railsjson/ruby-codegen/rails_json'
$white_label_dir = 'codegen/projections/white_label'
$rpcv2_cbor_dir = 'codegen/projections/rpcv2_cbor'
$rails_json_dir = 'codegen/projections/rails_json'

Dir.glob("tasks/**/*.rake").each do |task_file|
load(task_file)
Expand Down
4 changes: 3 additions & 1 deletion codegen/projections/rails_json/lib/rails_json.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion codegen/projections/rpcv2_cbor/lib/rpcv2_cbor.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion codegen/projections/white_label/lib/white_label.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions codegen/projections/white_label/spec/customizations_spec.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 7 additions & 95 deletions codegen/projections/white_label/spec/spec_helper.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 2 additions & 17 deletions codegen/smithy-ruby-codegen-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -146,44 +146,29 @@ tasks.register("generate-smithy-build") {
}
}


tasks.register<Copy>("copyWhiteLabelGem") {
mustRunAfter("copyIntegrationSpecs")
from("$buildDir/smithyprojections/smithy-ruby-codegen-test/white-label/ruby-codegen")
into("$buildDir/../../projections/")
}

tasks.register<Copy>("copyRpcv2CborGem") {
mustRunAfter("copyIntegrationSpecs")
from("$buildDir/smithyprojections/smithy-ruby-codegen-test/rpcv2cbor/ruby-codegen")
into("$buildDir/../../projections/")
}

tasks.register<Delete>("cleanProjections") {
delete("$buildDir/../../projections/white_label/")
delete("$buildDir/../../projections/rpcv2_cbor/")
}

tasks.register<Copy>("copyIntegrationSpecs") {
from("./integration-specs")
into("$buildDir/smithyprojections/smithy-ruby-codegen-test/white-label/ruby-codegen/white_label/spec")
}

tasks["smithyBuildJar"].enabled = false

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

tasks["build"]
.dependsOn(
// tasks["cleanProjections"],
tasks["buildSdk"])
.dependsOn(tasks["buildSdk"])
.finalizedBy(
tasks["copyIntegrationSpecs"],
tasks["copyWhiteLabelGem"],
tasks["copyRpcv2CborGem"]
)

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

0 comments on commit e0f1c95

Please sign in to comment.