I want a task in my top-level build.gradle file to depend on running 'compileJava' in subprojects. Currently the top-level.gradle file says:
subprojects { apply plugin: "java" } task wrap(dependsOn: 'compileJava' ...) This does not work. I can say gradle compileJava and it runs the "compileJava" target on all subprojects. But there is no "compileJava" task in the top-level project.
How can I make the "wrap" task depend on "compileJava" ?