Task dependency with Play framework


I use the play plugin to build my play application with Gradle.
Using the tasks defined by the plugins works fine.

But I have an issue when it comes to other tasks, like “javadoc”.
It relies on “compileJava”, and the “plain java” build fails.
It’s missing the packages generated by the play plugin : “import controllers.routes;” fails.

I figure this is generated by the “compilePlayBinaryPlayRoutes” task of the play plugin.
So I guess the “compileJava” task should depend on this one.

I’m not sure it’s the right way to do it.
Also, I tried and could not manage to make something work using “dependsOn” …

All of this is kinda new. Would you have any hint ?