Closed Vampire closed 6 years ago
Thanks - it's indeed a limitation.
Regarding doFirst
, I'd be cautious. I changed it to doLast
while fixing issue #4, and it turned out that Jigsaw parameters stopped being applied at all to the run
task. It needs some extera investigation.
No, of course not doLast
, that would be worse, as it is run after the existing actions, which is the compiler execution, amongst possible other actions.
Both, doLast
and doFirst
actions are executed at execution phase though and during execution phase no configuration should be changed, especially not those configurations that could influence the incremental execution, meaning the inputs and outputs of a task and thus its up-to-date check.
Configuration of a task should only be done during the configuration phase, so probably do it in an afterEvaluate
block instead to do it at end of configuration phase when the normal configuration actions are done, but still within the configuration phase.
Actually in which block it is done does not change the bug reported here, the bug here is mainly that setCompilerArgs
is used instead of getting them and adding the addtional ones. The doLast
think was only a side-note that should probably also get fixed.
Thanks for the explanation. I'll create a separate issue for updating the task configuration, and here I'll just fix for compilerArgs
.
The fix is available on master
branch. For now, overriding JVM args it not possible, because it breaks integration tests and I must take a closer look at it. If you notice any problems, feel free to reopen the issue.
What do you mean by "overriding JVM args is not possible"?
The compilerArgs
are the JVM args, aren't they?
See https://github.com/gradle/gradle-java-modules/issues/10 for full description