I’m trying to understand how I would have to declare a dependency on an artifact of a configuration in the same project so that a dependency on the task producing the artifact is established implicitly.
In the case I’m currently looking at, a project with basically the following build.gradle is supposed to build a JAR with some Java code and XML/XSL resources first, then build a PDF for the manual using the jdocbook plugin, using the resources in the JAR:
This works - running the “buildDocs” task added by the jdocbook plugin runs the “assemble” task first, and the resulting JAR file is used by JDocBook. But I’m guessing that there is a way to avoid the “afterEvaluate” part and have this dependency added implicitly. I haven’t found it, yet, though. Changing the above dependency to
didn’t help - I still need to add the task dependency explictly. What is the intended way of doing this?