Build-tool benchmarks published by vendors use repositories chosen to show a difference. Yours is the only one that matters, and both a cold and a warm measurement are needed because CI mostly runs cold.
Terminal
# cold: no cache, the CI condition
rm -rf node_modules/.cache dist && time <tool> build
# warm: the local development condition
time <tool> build
# and the one people forget: incremental after a one-line change
echo "// touch" >> src/index.ts && time <tool> build
Gradle builds JVM (and Android, and more) projects with a Groovy/Kotlin DSL, a vast plugin ecosystem, incremental builds, and a build cache. Bazel emphasizes hermetic, reproducible builds across many languages with fine-grained targets and remote caching and execution that scale to enormous repos.
In CI?
Gradle is the natural choice for JVM and Android projects, with a build cache and configuration cache that speed CI when tuned. Bazel pays off in giant monorepos where remote caching and precise targets rebuild only what changed across languages, at the cost of heavy setup.
Speed it up?
Cache the Gradle caches (or a Bazel remote/disk cache) so unchanged work is reused. Both build on CI runners; faster managed runners shorten compile, test, and packaging steps.
Which should I choose?
Building JVM or Android projects with rich plugins and flexibility: Gradle. Running a large multi-language monorepo needing hermetic builds and remote caching: Bazel. Most JVM teams stay on Gradle; Bazel suits scale that justifies the complexity.