Composite build - includeBuild and use within settings.gradle

I’m developing a plugin to be applied to a project’s settings, and am attempting to use a composite build during development.

Including the build works, but it seems I can’t use that same included build within the settings.gradle. It still attempts to find my plugin in a repository.

buildscript {

repositories {

dependencies {
    classpath 'com:myplugin:2.0.0'


includeBuild '../myplugin'
include ':app', ':module'

apply plugin: 'com.myplugin'

I get the error:

Error:Could not find com.myplugin:2.0.0.
Searched in the following locations:


This doesn’t work yet. It’s a bit of a chicken and egg problem because we need to evaluate settings.gradle (which resolves the classpath without included builds) to get the list of included builds.

What does your Settings plugin do? You might be able to get away with applying your plugin via an init script to get around this.

Ah ok I thought that might be the case.

My plugin includes some projects in the build. Can this be done as a Project plugin, or an init plugin?

stumbled upon this:

The directory buildSrc is treated as an included build

while your answer is absolute correct and matches:

Improvements planned: Making the implicit buildSrc project an included build.

perhaps s.o. with more technical insights can verify this doc

last but not least: to state out: actually it is impossible to move buildSrc to another location than “rootproject/buildSrc”, right?