Open zyxist opened 6 years ago
The reconfiguration has been changed. Regarding incremental compilation: there is no difference between reconfiguring the JavaCompile
tasks in doFirst
, or in the configuration phase. In both cases, the debug log shows that the incremental compilation works as expected. The task seems to ignore changes of the compilation options. However, I have added a test to ensure that the plugin covers this use case as well.
Changed to what? As far as I can see from the commit, you still configure the task during execution phase, not configuration phase.
I also never said it will influence incremental compilation, but incremental task execution, the UP-TO-DATE checks that determine whether a task needs to be executed at all or not.
Also this does not only affect incremental execution but also using the build cache.
There might be other stuff affected as configuration of a task should never be changed during execution phase, but only during configuration phase.
I've reopened the issue - I checked once more and indeed, the whole orchestrator is called in afterEvaluate()
, which should not happen, because there are parts of the tasks that were not supposed to called so lately.
If you call doLast
or doFirst
in am afterEvaluate
block, that doesn't change when it is executed. doLast
and doFirst
blocks are still executed during execution phase, calling those methods in afterEvaluate
just attaches them at the end of configuration phase but they are still executed at execution phase.
Follow up: #9
Compile task reconfiguration is done in
doFirst
phase (during execution). They change the configuration which affects incremental compilation. Moving it to the configuration phase should solve this issue.