Bazel rules for building and running Quarkus applications. Supports quarkus_app (Fast JAR, Uber JAR, mutable JAR, legacy JAR, AOT JAR, and native executables), hermetic build-time configuration, extension-driven Java code generation, dev mode with hot-reload, quarkus_test (@QuarkusTest), quarkus_integration_test (@QuarkusIntegrationTest), and quarkus_extension_runtime (building, using, and publishing custom Quarkus extensions — see Building Quarkus Extensions and examples/demo_extension).
See install instructions on the release page.
Add to your MODULE.bazel:
bazel_dep(name = "com_clementguillot_rules_quarkus", version = "<VERSION>")load(
"@rules_quarkus//quarkus:defs.bzl",
"quarkus_app",
"quarkus_integration_test",
"quarkus_java_library",
"quarkus_test",
)
quarkus_java_library(
name = "lib",
srcs = glob(["src/main/java/**/*.java"]),
codegen_srcs = glob(["src/main/proto/**/*.proto"]),
deps = [
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:io_quarkus_quarkus_grpc",
],
)
quarkus_app(
name = "app",
continuous_test = ":test",
package_type = "fast-jar", # default; see docs for every JVM layout
version = "1.0.0-SNAPSHOT",
deps = [":lib"],
)
quarkus_test(
name = "test",
deps = [":test_lib"],
)
quarkus_integration_test(
name = "integration_test",
app = ":app",
deps = [":test_lib"],
)bazel run //:app # Production mode
bazel run //:app_dev # Dev mode (hot-reload + Dev UI continuous testing)
bazel run //:app_test # Console-only continuous testing
bazel test //:test # @QuarkusTest
bazel test //:integration_test # @QuarkusIntegrationTest against the selected package
bazel coverage //:test # Bazel LCOV coverageIntegration tests included in a broader bazel coverage command run
uninstrumented and do not prevent supported quarkus_test targets from
producing LCOV.
See the Getting Started guide for full setup instructions.
- Quarkus:
3.33.4(LTS) or3.40.1(LTS) - Bazel: 7+, 8+, or 9+
- Java: 17+
- Mode: Bzlmod only (WORKSPACE not supported)
Important: You must use one of the exact supported versions listed above (
3.33.4or3.40.1). Quarkus bytecode generated during augmentation is tightly coupled to the exact patch version — even within the same minor, runtime incompatibilities can occur.
- Getting Started
- Building Quarkus Extensions
- Native Image
- Architecture
- Developer Guide
- Dev Mode
- Code Generation
- Quarkifier
See LICENSE.
