Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9505

Gradle tasks with outputs.upToDateWhen {true} are hard to re-run in separation

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0
    • None
    • None
    • New

    Description

      We have several tasks that only have inputs and no outputs. For incremental builds, this means that they are only re-run if:

      • the inputs change,
      • --rerun-tasks is given on command line.

      Gradle has a built-in rule for "cleaning" the outputs of a task - a "clean[TaskName]" rule, so in theory you could clean the outputs of a single task and re-run the entire build with only that task being re-run. It would be sometimes convenient.

      We could add a dummy output to these tasks instead of upToDateWhen (for example, touch an empty file at the end of the task's execution). Then cleanXXX should work for them (and so would incremental builds).

      Attachments

        Issue Links

          Activity

            People

              dweiss Dawid Weiss
              dweiss Dawid Weiss
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m