Reputation: 27886
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:
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.
Upvotes: 1
Views: 2548
Reputation: 27886
Looks like the plugin layout is different in buildSrc
and I should have been following this example: https://docs.gradle.org/current/samples/sample_convention_plugins.html
and applying using:
plugins {
id 'example.java-conventions'
}
Upvotes: 1