Closed jorgeluengo closed 7 years ago
It was my mistake, the right way is: MyPlugin.groovy:
import se.transmode.gradle.plugins.docker.DockerTask
class MyPlugin implements Plugin<Project> {
void apply(Project project) {
project.plugins.apply('docker')
project.task("MyTask", type: DockerTask){ ...
If I try to use this plugin and I create a new standalone plugin from there, implementing the new functionality into src/main/groovy/gradle/plugins/MyNewplugin.groovy I'm not able to make reference to it in order to load its functionality and extend it.
I tried different ways to do it, but it did not allow me to reach my goal.
E.g. :
I added "project.task('BuildDocker',type: Docker)" into MyNewPlugin.groovy and I can build it "gradle build" but when this plugin is called from another place is not able to resolve the 'Docker' type. Any idea?