First of all, sorry if I missed this in the documentation somewhere.
I am trying to write a Gradle plugin in Java.
In particular, I need to do this:
public class MyPlugin implements Plugin<Project>{
@Override
public void apply(Project project) {
project.getSourceDir();
}
}
In other words, how can I, if possible, get the directory where my plug-in project resources are located?
I proceed from my assumption that when the apply method gets called Gradle will already know where the sources are, and this location can not further change?
Thank.
source
share