Skip to content

Commit f495715

Browse files
committed
Make the preprocessing tasks for workflow files cacheable
1 parent f6a2a86 commit f495715

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

build-logic/preprocess-workflows/src/main/groovy/org/spockframework/gradle/PreprocessGithubWorkflow.groovy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,20 @@ import org.gradle.workers.WorkerExecutor
1313
import javax.inject.Inject
1414

1515
@CompileStatic
16+
@CacheableTask
1617
abstract class PreprocessGithubWorkflow extends DefaultTask {
1718
@InputFile
19+
@PathSensitive(PathSensitivity.RELATIVE)
1820
abstract RegularFileProperty getWorkflowScript()
1921

2022
@InputFiles
23+
@PathSensitive(PathSensitivity.RELATIVE)
2124
abstract ConfigurableFileCollection getImportedFiles()
2225

23-
@InputFiles
26+
@Classpath
2427
abstract ConfigurableFileCollection getKotlinCompilerClasspath()
2528

26-
@InputFiles
29+
@Classpath
2730
abstract ConfigurableFileCollection getMainKtsClasspath()
2831

2932
@Nested

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,3 +404,11 @@ def configureGroovydoc(TaskProvider groovydoc) {
404404
include "spock/**"
405405
}
406406
}
407+
408+
tasks.preprocessBranchesAndPrsWorkflow {
409+
outputs.file('.github/codecov.yml').withPropertyName('codecovConfig')
410+
}
411+
412+
tasks.preprocessReleaseWorkflow {
413+
outputs.file('.github/codecov.yml').withPropertyName('codecovConfig')
414+
}

0 commit comments

Comments
 (0)