For a plugin that is applied in the settings.gradle file you have three options:
declare the plugin class directly in the settings.gradle file (not that useful for production but good for testing) * declare the plugin in the buildSrc project * resolve the plugin as a third party dependency
To resolve a plugin as a thirdparty dependency you need to declare a buildscript block and declare the dependency (& repository) to resolve the plugin. Be aware that the buildscript block in your build.gradle does not work for this as the build.gradle file is evaluated AFTER the settings.gradle file. You have to declare the buildscript block in your settings.gradle file. example:
buildscript{
repositories{
mavenCentral();
}
dependencies{
classpath "org.acme:settingsplugin:1.0"
}
}
apply plugin 'settingsplugin'
// declare some projects
include 'shared'
include 'api'
include 'services:webservice'
rootProject.name = 'settingsplugin'
We have plans and already working on reducing the boilerplate for declaring plugins but this is currently WIP.