Is it possible to make a project’s buildscript dependent on a task library in a multi-module project? The documentation show some examples of external dependencies, but I didn’t find any hint on using dependencies inside a multi-module project.
Based on the customPlugin sample from the gradle sources you can find a demo of my problem here: https://github.com/gesellix/gradleCustomPlugin
When executing ‘./gradlew’ I get an error message like this:
FAILURE: Build failed with an exception.
Build file ‘/home/gesellix/workspace/gradleCustomPlugin/build.gradle’ line: 14
- What went wrong:
A problem occurred evaluating root project ‘gradleCustomPlugin’.
Could not find property ‘org’ on root project ‘gradleCustomPlugin’.
I would expect that Gradle evaluated the “:plugin” submodule before the parent project and that the plugin’s task classes would be available in the parent project. I would also expect that I wouldn’t have to apply the “plugin”, because I only need the GreetingTask in the buildscript’s classpath.
Is this possible with Gradle or do I have to build the plugin module uncoupled from the parent project?
Thanks for your help!