Hi guys. I want to create a simple task which runs...
# community-support
r
Hi guys. I want to create a simple task which runs a bunch of our linters in sequence and fails (exiting early) if a task in the sequence fails. I had this, but some tasks are failing and the end result still says SUCCESS if the last task succeeds:
Copy code
afterEvaluate {
    task healthCheck(dependsOn: ['test', 'ktlintFormat', 'detekt', 'lint', 'connectedMockDebugAndroidTest']) {
        tasks.findByName('ktlintFormat').mustRunAfter 'test'
        tasks.findByName('detekt').mustRunAfter 'ktlintFormat'
        tasks.findByName('lint').mustRunAfter 'detekt'
        tasks.findByName('connectedMockDebugAndroidTest').mustRunAfter 'lint'
    }
}