0

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

1 Answer 1

1
task wrap { dependsOn { subprojects.compileJava } } 
Sign up to request clarification or add additional context in comments.

1 Comment

Easy enough! Should have been obvious, but it wasn't.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.