Affects Version/s: None
Fix Version/s: 2.2-rc-1
a typical migration scenario of your Ant Java project starts with build.gradle looking like this:
it will probably fail because of name clash of tasks from build.xml and those provided by Java plugin:
FAILURE: Build failed with an exception.
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.
Possible solutions (ideas from mailing list discussion):
a) implement an "ovewriteTaskByDefault" feature in Gradle
b) I think the solution lives on AntBuilder or some other Ant-specific thing. Some options:
- ant.import() allows you to specify a namespace for the imported tasks, eg prefix each task with 'ant.'
- ant.import() allows you to specify which tasks to include or exclude when importing.