How can a subproject in a multiproject Gradle build use a Gradle plugin that's defined in the root project's buildSrc folder?
I've basically got:
- settings.gradle
- buildSrc/src/main/groovy/com/example/conventions/JavaConventionsPlugin.groovy
- buildSrc/build.gradle
- common/build.gradle
and I'm trying to apply the plugin in the common project:
apply plugin: 'com.example.conventions.JavaConventionsPlugin'
but it says
Plugin with id 'com.example.conventions.JavaConventionsPlugin' not found.
Looks like the plugin layout is different in
buildSrcand I should have been following this example: https://docs.gradle.org/current/samples/sample_convention_plugins.htmland applying using: