I receive the follow error message:
A problem occurred evaluating script. > Failed to apply plugin [class 'de.undercouch.gradle.tasks.download.DownloadTaskPlugin'] > Cannot add extension with name 'download', as there is an extension already registered with that name.
The cause is that we apply 2 different script plugins which apply the same plugin. The structure is like:
build.gradle apply from: "util1.gradle" apply plugin: de.undercouch.gradle.tasks.download.DownloadTaskPlugin apply from: "util2.gradle" apply plugin: de.undercouch.gradle.tasks.download.DownloadTaskPlugin
In the normal case we use only one of the both utils.gradle. But now we have a case in which we need both. Can we prevent the duplicate registration through adding a dependency if the plugin already exists?