Gradle custom task which runs multiple tasks
If you need to execute some tasks in predefined order, then you need to not only set dependsOn, but also to set mustRunAfter property for this tasks, like in the following code: task cleanBuildPublish { dependsOn ‘clean’ dependsOn ‘build’ dependsOn ‘publish’ tasks.findByName(‘build’).mustRunAfter ‘clean’ tasks.findByName(‘publish’).mustRunAfter ‘build’ } dependsOn doesn’t define an order of tasks execution, it … Read more