# Task dependency with Play framework

**URL:** <https://discuss.gradle.org/t/task-dependency-with-play-framework/31131>\
**Category:** Help/Discuss\
**Created:** [March 26, 2019, 5:44pm UTC](https://discuss.gradle.org/t/task-dependency-with-play-framework/31131 "2019-03-26T17:44:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Utundu](https://avatars.discourse-cdn.com/v4/letter/u/53a042/32.png) [@Utundu](https://discuss.gradle.org/u/Utundu)\
**Post date:** [March 26, 2019, 5:44pm UTC](https://discuss.gradle.org/t/task-dependency-with-play-framework/31131/1 "2019-03-26T17:44:05Z")

</div>

Hello,

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 ?  
Thanks
