With the Gradle 1.7 nightly builds, I find that the overwrite has no effect and it invokes the Gradle compile java task. Is this by design? Will this not work with Gradle 1.7 onwards?
I’m not aware of any (intentional) changes. Note that ‘overwrite’ is (and has always been) half-broken in that it’s not defined if tasks originally depending on the old task will, after overwriting the task, depend on the new task. Therefore it’s best avoided. If absolutely necessary, you can instead overwrite a task’s actions, which usually works better.
Why do you want to use the Ant javac task, and why don’t you do it with ‘javaCompile.useAnt = true’?
Thanks, we are making use of the ‘sourcepath’ argument to break up the compile into smaller file sets (so that the memory required is manageable). The compileJava task will be preceded by other tasks that have already compiled the java files and hence compileJava is overwritten.
Hey kiran, just noticed this thread. I think the main reason for the specific Compile task in your codebase was the specific definition of your in and outputs ( just Parts of your sources)