I have a code generation task that extends type: Exec and needs a maven dependency to be downloaded before it can run, and the code generation task must run before my compileJava task.
What would be a good way to force the dependency to be downloaded to my ~/.m2/repository before my code generation task executes? There doesn’t appear to be a dependencies scope that I can find that will make that happen, despite trying compileOnly and annotationProcessor.
Thanks @daggerok, but I’d like for the solution to be transparent to the other developers. I suppose I could add another task that’s also of type: Exec that invokes gradlew with the commands you gave.
Still, it seems like there ought to be a way in gradle to force the download of Maven dependencies.