I have a gradle task
checkStaging
that checks
lint
and
ktLintCheck
and after that run all unit tests for the modules.
The problem is that even though
ktLintCheck
fails, the task keeps running and then fails after 8-11 minutes. I want the task to fail as soon as ktLintCheck failed. Any idea, how to do that?
task cleanAll(dependsOn: [':lib_mvp:clean', ':lib_service:clean', ':Dream:clean'])
task checkStaging(dependsOn: ['cleanAll',
':lib_mvp:lintDebug', ':lib_service:lintStagingDebug', ':Dream:lintStagingDebug',
':lib_mvp:ktlintCheck', ':lib_service:ktlintCheck', ':Dream:ktlintCheck',
':lib_mvp:testDebugUnitTest', ':lib_service:testStagingDebugUnitTest', ':Dream:testStagingDebugUnitTest'])
checkStaging.mustRunAfter cleanAll
Note: it’s build.gradle file which is in groovy.