I’m currently developing a plugin to use with my webapp project. They are both sibling projects within a multi project build setup. I’d like to configure the webapp build script to use the plugin. I’m not sure how to do this. Currently I’ve got:
This causes problems with the clean task (it says “java.io.IOException: could not remove myplugin build folder”) and the plugin is not always detected on the buildscript classpath. Essentially what I’d like to do is this:
Develop a gradle plugin for use in a sibling project.
Test the plugin with the sibling project by making sure that the plugin is built and added to the buildscript classpath
I should mention that we intend one day to make this possible (using projects from the actual build as build logic instead of requiring use of buildSrc), but there are no immediate plans to work on it.
I’d seen the documentation on using buildSrc but had hoped to keep the codebases as decoupled as possible. I thought a multi project build setup might do the trick. Ah well, that’s a shame.
Could I setup the build script in the webapp project to check for the plugin jar and then throw an error if it’s not been built, otherwise include it in the build script classpath? So that I could use it within the build script with
Hi - is this still the best approach to break the ‘chicken-and-egg’ situation of developing plugins? I have a similar issue where I have two subprojects, one is the plugin itself and the other is the test-app that uses my plugin.