Global Plugins in Gradle
gradle, plugins
Solution
You can put this into `~/.gradle/init.gradle`:
rootProject.allprojects {
apply plugin: "eclipse"
}
The drawback of this approach is that it makes the build less reproducible. People now need to add something to their `init.gradle` to make (some aspect of) the build work. Therefore, I would recommend to apply the Eclipse plugin in the main build script; it won't hurt people who don't use it.
Problem
I am using Gradle as a build tool for my Scala projects. I am also using Eclipse for development, so I always use the `apply plugin: 'eclipse'` in my build files. Is there also a way to define the `apply plugin` globally? SBT already has such a feature. The reason why I want this, is that other developers who’re using my project probably don’t use Eclipse but another IDE and they would have to change the build script for their needs. If there were a global configuration file, one could put personal configurations in there and it wouldn’t conflict other ones.