Take a look at my original post for a CompositePlugin and this version by @rodney757 which is updated to use Gradle’s dependencySubstitution.
The CompositePlugin.groovy uses a project/source dependency if it’s available and otherwise falls back to jar dependencies. It can be force to use jars with the forceJars system property (or in settings.gradle you can comment out a projects includeFlatIfLocal). Anyway, those should be enough to get you started.