If I have a multiproject build and I want to creat...
# gradle
e
If I have a multiproject build and I want to create a new task that runs "build" (as if I ran it from the command line, ie it runs build for all subprojects in the appropriate order) before it does anything else, how can I achieve this? My assumption was that:
Copy code
tasks.create("whatever") { dependsOn(tasks.build) }
would do the trick however it just runs build on the root project.
v
tasks.register("whatever") { dependsOn(allprojects.map { tasks.build }) }