Skip to content

Commit

Permalink
Merge pull request #1546 from lf-lang/clem.fix-gradle-up2date-check
Browse files Browse the repository at this point in the history
Fix #1544 - up to date check for updateRustRuntime
  • Loading branch information
cmnrd authored Jan 16, 2023
2 parents 03c5fe8 + 2bb5797 commit 06fa27b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions org.lflang/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ 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"
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
Expand Down Expand Up @@ -106,6 +108,8 @@ 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)

Expand Down

0 comments on commit 06fa27b

Please # to comment.