[GRADLE-2515] Possible bug on plugin task override Created: 09/Oct/12 Updated: 04/Jan/13 Resolved: 19/Oct/12 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.2 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Alexander Jipa | Assignee: | Szczepan Faber |
Resolution: | Cannot Reproduce | Votes: | 0 |
Description |
When I'm trying to override a task that is provided from plugin I got a "a task with that name already exists" exception. The behavior is rather strange since the overriden logic seems to work (println writes data to console). I tried doing the following: ... task compile(overwrite: true) { println 'Overwritten' }... I'm not that into gradle internals but with little thinking I figured out that the problem may not be in my override but rather in plugin trying to inject it's own tasks with the same name. The workaround that helped me is the following: ... afterEvaluate { } Maybe all task overrides should happen after evaluation or I'm missing something? P.S. |
Comments |
Comment by Szczepan Faber [ 12/Oct/12 ] |
Thanks for reporting the javadoc issue (I've fixed it). Overwrite feature works according to my knowledge (we have integ tests for that). Perhaps the gradlefx also adds the compile task using 'afterEvaluate'? |