I feel like what I’m trying to do here is very basic, but I cannot seem to find documentation on the proper, gradle way to do this. Assuming the following tasks and dependency
task build task clean task compile build.dependsOn "compile"
How do I define a new task (rebuild) that first performs a clean and then performs build (and the dependent compile). Making rebuild dependent on clean and build does not guarantee that clean is run before build. Using .execute() is not supported I read, and more importantly does not run the dependent compile task.