From c96c038157036ba1ee386fb58da548f8dce85da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 13 Jan 2023 15:23:43 +0100 Subject: [PATCH 1/2] Fix #1544 - up to date check for updateRustRuntime --- org.lflang/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.lflang/build.gradle b/org.lflang/build.gradle index 21f6d6a43d..f937ce6dfc 100644 --- a/org.lflang/build.gradle +++ b/org.lflang/build.gradle @@ -78,6 +78,7 @@ configurations { task getSubmoduleVersions(type: Exec) { description('Run a Git command to get the current status of submodules') workingDir project.rootDir + outputs.upToDateWhen { false } def command = "git submodule status" if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) { @@ -106,6 +107,7 @@ task updateRustRuntime { description('Record the VCS revisions of the language runtimes into a properties file available at runtime.') dependsOn getSubmoduleVersions + inputs.files(getSubmoduleVersions.outputs) ext.outputFile = file("$project.projectDir/src/lib/rs/runtime-version.properties") outputs.file(outputFile) From 2bb57972e83e2e41c64d74e6ea039ab7d2ca2f92 Mon Sep 17 00:00:00 2001 From: Christian Menard Date: Mon, 16 Jan 2023 10:25:59 +0100 Subject: [PATCH 2/2] Add comments --- org.lflang/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.lflang/build.gradle b/org.lflang/build.gradle index f937ce6dfc..886744a285 100644 --- a/org.lflang/build.gradle +++ b/org.lflang/build.gradle @@ -78,6 +78,7 @@ configurations { task getSubmoduleVersions(type: Exec) { description('Run a Git command to get the current status of submodules') workingDir project.rootDir + // This will make gradle execute git submodule status every time updateRustRuntime is called outputs.upToDateWhen { false } def command = "git submodule status" @@ -107,6 +108,7 @@ task updateRustRuntime { description('Record the VCS revisions of the language runtimes into a properties file available at runtime.') dependsOn getSubmoduleVersions + // If the output of the git submodule status did not change (the getSubmoduleVersions task), then this task is considered up to date. inputs.files(getSubmoduleVersions.outputs) ext.outputFile = file("$project.projectDir/src/lib/rs/runtime-version.properties") outputs.file(outputFile)