If I try to use the following gradle plugin https://github.com/Transmode/gradle-docker 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?
Assuming you want to extend an existing plugin, but creating a new plugin.
In this case you’ll need to add the Maven coordinates of the Transmode plugin to the implementation or compile configurations.
BTW there are a number of Docker plugins for Gradle. Have you looked at the others to see whether they are already providing thedunctionality you might need. There is also a Packer plugin which make light work of building Docker images.