In one of my modules I have a Jar task which always runs, regardless that the classes did not change. When I run the build with -i, it tells me that the Jar task is ran because “No history is available.” - here is a sample extract from the build log (formatted for readability):
INF - AbstractTaskPlanExecutor
- :stream:classes (Thread[Task worker 1,5,main] - start
LIF - TaskExecutionLogger
- :stream:classes
DEB - ExecuteAtMostOnceTaskExecuter
- Starting to execute task ':stream:classes'
INF - SkipTaskWithNoActionsExecuter
- Skipping task ':stream:classes' as it has no actions.
DEB - ExecuteAtMostOnceTaskExecuter
- Finished executing task ':stream:classes'
LIF - TaskExecutionLogger
- :stream:classes UP-TO-DATE
INF - AbstractTaskPlanExecutor
- :stream:classes (Thread[Task worker 1,5,main]) - complete
INF - AbstractTaskPlanExecutor
- :stream:jar (Thread[Task worker 1,5,main] - start
LIF - TaskExecutionLogger
- :stream:jar
DEB - ExecuteAtMostOnceTaskExecuter
- Starting to execute task ':stream:jar'
DEB - SkipUpToDateTaskExecuter
- Determining if task ':stream:jar' is up-to-date
INF - SkipUpToDateTaskExecuter
- Executing task ':stream:jar' due to: No history is available.
DEB - ExecuteActionsTaskExecuter
- Executing actions for task ':stream:jar'.
DEB - ExecuteAtMostOnceTaskExecuter
- Finished executing task ':stream:jar'
INF - AbstractTaskPlanExecutor
- :stream:jar (Thread[Task worker 1,5,main]) - complete
DEB - AbstractTaskPlanExecutor
- Task worker [Thread[Task worker 1,5,main]] finished, busy: ...
DEB - DefaultTaskGraphExecuter
- Timing: Executing the DAG took 0.389 secs
As you can see, the classes task didn’t even run, so the class files have not changed, but regardless how many times in a raw I run the build, the Jar task always runs. This causes ripple effect and my build ends up recompiling a number of other projects.