I have a very simple gradle plugin I've developed. I've been using it without issue in an example project, like so
build.gradle
apply plugin: "com.imrichardcole.simpleplugin"
settings.gradle
buildscript {
dependencies {
classpath files("plugins/simple_plugin-0.0.11.jar")
}
}
Which works as expected. I'm now looking to move this from the projects build.gradle into init.gradle under ~/.gradle/ so that it can be applied to all gradle projects I might ever work on.
However when moving the above snippets into the init.gradle file, I get the error:
Plugin with id 'com.imrichardcole.simpleplugin' not found
Why does this work when it's inside build.gradle or settings.gradle but not init.gradle?