diff --git a/buildSrc/src/main/kotlin/CodegenTestCommon.kt b/buildSrc/src/main/kotlin/CodegenTestCommon.kt index 1ee6ee7972..7b05e6651f 100644 --- a/buildSrc/src/main/kotlin/CodegenTestCommon.kt +++ b/buildSrc/src/main/kotlin/CodegenTestCommon.kt @@ -271,9 +271,10 @@ fun Project.registerGenerateCargoWorkspaceTask( val properties = PropertyRetriever(rootProject, this) project.tasks.register("generateCargoWorkspace") { description = "generate Cargo.toml workspace file" + val path = project.buildDir.resolve("$workingDirUnderBuildDir/Cargo.toml") + outputs.file(path) doFirst { - project.buildDir.resolve("$workingDirUnderBuildDir/Cargo.toml") - .writeText(generateCargoWorkspace(pluginName, codegenTests(properties, allCodegenTests))) + path.writeText(generateCargoWorkspace(pluginName, codegenTests(properties, allCodegenTests))) } } }