Task dependencies work fine as long as they are in the same project. But when working with a root project and subprojects, it is no longer that simple. You have to do some hack and add some closure after evaluation. The code snippet below is in the roots projects build.gradle script, and defines a dependency from the root.build to depend on all assemble tasks (of all projects).

Task dependency from root project to subprojects:

gradle.afterProject {project, projectState ->
    if (project.tasks.findAll { it.name == 'assemble' }) {
        build.dependsOn(project.assemble)
    }
}