Skip to content

Commit b0f03f6

Browse files
committed
Ensure shellcheck tasks run when library scripts are changed
The library scripts were not part of the task inputs and so they were not considered when doing up-to-date checks and when calculating the cache key. This means the shellcheck tasks could be skipped if the only script changes were to the library inptus.
1 parent f713821 commit b0f03f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ tasks.named("assemble") {
171171
tasks.register<Shellcheck>("shellcheckGradleScripts") {
172172
group = "verification"
173173
description = "Perform quality checks on Gradle build validation scripts using Shellcheck."
174+
inputs.files(copyGradleScripts.get().outputs.files.asFileTree.matching {
175+
include("**/*.sh")
176+
})
174177
sourceFiles = copyGradleScripts.get().outputs.files.asFileTree.matching {
175178
include("**/*.sh")
176179
exclude("lib/")
@@ -186,6 +189,9 @@ tasks.register<Shellcheck>("shellcheckGradleScripts") {
186189
tasks.register<Shellcheck>("shellcheckMavenScripts") {
187190
group = "verification"
188191
description = "Perform quality checks on Maven build validation scripts using Shellcheck."
192+
inputs.files(copyMavenScripts.get().outputs.files.asFileTree.matching {
193+
include("**/*.sh")
194+
})
189195
sourceFiles = copyMavenScripts.get().outputs.files.asFileTree.matching {
190196
include("**/*.sh")
191197
exclude("lib/")

0 commit comments

Comments
 (0)