Skip to content

Commit

Permalink
Pin dependencies using smithy runtime lockfile during `codegen-server…
Browse files Browse the repository at this point in the history
…-test`
  • Loading branch information
ysaito1001 committed Dec 3, 2024
1 parent a61500a commit a9a69a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion codegen-server-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ val properties = PropertyRetriever(rootProject, project)
val pluginName = "rust-server-codegen"
val workingDirUnderBuildDir = "smithyprojections/codegen-server-test/"

val checkedInSmithyRuntimeLockfile = rootProject.projectDir.resolve("rust-runtime/Cargo.lock")

dependencies {
implementation(project(":codegen-server"))
implementation("software.amazon.smithy:smithy-aws-protocol-tests:$smithyVersion")
Expand Down Expand Up @@ -104,9 +106,10 @@ val allCodegenTests = "../codegen-core/common-test-models".let { commonModels ->
project.registerGenerateSmithyBuildTask(rootProject, pluginName, allCodegenTests)
project.registerGenerateCargoWorkspaceTask(rootProject, pluginName, allCodegenTests, workingDirUnderBuildDir)
project.registerGenerateCargoConfigTomlTask(layout.buildDirectory.dir(workingDirUnderBuildDir).get().asFile)
project.registerCopyCheckedInCargoLockfileTask(checkedInSmithyRuntimeLockfile, layout.buildDirectory.dir(workingDirUnderBuildDir).get().asFile)

tasks["smithyBuild"].dependsOn("generateSmithyBuild")
tasks["assemble"].finalizedBy("generateCargoWorkspace", "generateCargoConfigToml")
tasks["assemble"].finalizedBy("generateCargoWorkspace", "copyCheckedInCargoLockfile", "generateCargoConfigToml")

project.registerModifyMtimeTask()
project.registerCargoCommandsTasks(layout.buildDirectory.dir(workingDirUnderBuildDir).get().asFile)
Expand Down

0 comments on commit a9a69a5

Please sign in to comment.