Dependency between plugin and project inside same multi-project build

The question is similar to stackoverflow quest ( with one change - the plugin is used to be a “public”. It means it will be published to maven repo and other projects will use it. So I want to write a “public” gradle plugin but I also want to use the same plugin in same multiproject the plugin is developed in in another module. For example example module will use the plugin to demonstrate how the plugin is used in other applications.

I tried to move plugin to buildSrc but I don’t know how to publish / install such plugin to maven repo. I also tried to extend sources set.

‘’’ sourceSets {

main {

groovy.srcDirs =


resources.srcDirs = ["…/my-gradle-plugin/src/main/resources"]

} } ‘’’

But the IntelliJ IDEA has problem to import such gradle project: ‘Can’t register given path of type ‘SOURCE’ because it’s out of content root.’

Thanks for your help, -lk

Same problem here, did you manage to find a solution ?

Thanks, Marc