'How to solve this 'eclipse' task which collides with the existing one?
I'm trying to 'decorate' the gradle eclipse task with a re-definition of the 'eclipse' task which will add some information such as logs, description, and possibly other things, when running a gradle eclipse command :
task eclipse(type: GradleBuild) {
description "Creates eclipse configuration files"
group "IDE"
startParameter = project.gradle.startParameter.newInstance()
startParameter.setTaskNames(["eclipse"])
buildFile = project.file("my-projects/build.gradle")
doFirst {
logger.lifecycle("Creating eclipse configuration files")
}
}
Now it complains because eclipse is an existing task :
Cannot add task 'eclipse' as a task with that name already exists.
I believe this was allowed in very old versions of gradle, and now it's not working.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
