Make EvalTask track resolved output paths and fix file() notation on Gradle on Windows (#403)

* Add `getEffectiveOutputFiles` and `getEffectiveOutputDirs` to `EvalTask`, and mark them as output files/dirs so they are tracked by Gradle. This enables implicit dependency tracking between two tasks.
* Fix usage of `file()` notation in Gradle scripts when on Windows.
This commit is contained in:
Daniel Chao
2024-07-25 17:41:03 -07:00
committed by GitHub
parent e3133f604b
commit 604b042d1b
5 changed files with 369 additions and 30 deletions

View File

@@ -51,9 +51,10 @@ constructor(
private val consoleWriter: Writer = System.out.writer(),
) : CliCommand(options.base) {
/**
* Output files for the modules to be evaluated. Returns `null` if `options.outputPath` is `null`.
* Multiple modules may be mapped to the same output file, in which case their outputs are
* concatenated with [CliEvaluatorOptions.moduleOutputSeparator].
* Output files for the modules to be evaluated. Returns `null` if `options.outputPath` is `null`
* or if `options.multipleFileOutputPath` is not `null`. Multiple modules may be mapped to the
* same output file, in which case their outputs are concatenated with
* [CliEvaluatorOptions.moduleOutputSeparator].
*/
@Suppress("MemberVisibilityCanBePrivate")
val outputFiles: Set<File>? by lazy {