Hi,
I’m trying to create a task dependency on on a task from the Play Framework plugin. The reason I’m doing it is because I’d like to use Launch4j to create an exe.
I’m using the launch4j plugin (id ‘edu.sc.seis.launch4j’ version ‘1.6.1’), and I want one of its tasks to depend on the Play plugin’s stagePlayBinaryDist task (as well as rely on the task for a listing of output files).
I keep getting ‘task does not exist’ sort of errors when I do:
copyL4jLib.dependsOn project.tasks.getByName('stagePlayBinaryDist')
However, if I do:
gradle.taskGraph.whenReady { TaskExecutionGraph taskGraph -> println project.tasks.getByName('stagePlayBinaryDist') }
it works fine, which makes me think that the tasks are being dynamically added or something.
Is there something I’m missing here? How would I be able to set
copyL4jLib.dependsOn project.tasks.getByName('stagePlayBinaryDist') launch4j { mainClassName = 'play.core.server.NettyServer' copyConfigurable = project.tasks.getByName('stagePlayBinaryDist') }
Thanks!