gradle check: Usage, Options & Common CI Errors
Run every verification task - test plus lint/quality - and nothing else.
check is Gradle’s lifecycle task that runs all verification tasks. It depends on test and on any quality tasks added by plugins (checkstyle, spotbugs, jacoco verification, ktlint), but it does not assemble artifacts.
What it does
check aggregates verification: it runs test plus whatever check-dependent tasks plugins register. Running build is effectively assemble + check, so check is the way to run only the verification half.
Common usage
./gradlew check
./gradlew check -x test # run other checks, skip unit tests
./gradlew check --continue # run all checks, report all failuresCommon error in CI (and the fix)
Symptom: check fails on the first verification task and later checks never run, hiding additional problems. Cause: Gradle stops at the first failure by default. Fix: pass --continue so Gradle runs every independent verification task and reports all failures at once, then fix them together; the consolidated reports live under build/reports/.