Hi all,
I tried to move two Ant builds to Gradle (mostly for fun and to learn
Gradle better). I started with
ant.importBuild 'build.xml'
and checked that now it works fine from Gradle. Then I wanted to
gradually move build logic from build.xml to build.gradle (target by
target), so I added Java plugin
usePlugin 'java'
at this point I get a lot of FAILURES:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/tomek/temp/reportng/reportng/build.gradle' line: 3
* What went wrong:
A problem occurred evaluating root project 'reportng'.
Cause: Cannot add task ':clean' as a task with that name already exists.
I think it is a very common situation, that build.xml contains tasks
like clean, test or jar which overlaps with those provided by Java
plugin. So, everyone converting from Ant to Gradle will experience the
same problem.
Would it be possible to have "ovewriteTaskByDefault" feature in Gradle ?
At the moment, the solution which works for me is to rename
"problematic" tasks in build.xml so the error doesn't appear. But for
larger build.xml it can be painful. Is there any better way ?
--
Tomek
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email