Imagine your Gradle
check task executes unit tests, integration tests, static analysis, and code coverage.
You may want to run just the tests (unit and integration) but not code coverage and analysis. That it is to say, you would like to skip specific Gradle tasks.
@mrhaki shows us how to do it.
In Gradle we can create dependencies between tasks. But we can also exclude certain tasks from those dependencies. We use the command-line option -x or --exclude-task and specify the name of task we don't want to execute. Any dependencies of this task are also excluded from execution.