8000 GitHub - ShobhitSingh11/bazel-java: Bazel java example project
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ShobhitSingh11/bazel-java

 
 

Repository files navigation

Simple Java+bazel example project

This is a simple java example project that tries to follow best practices.

Usage

  1. Clone the repo k
  2. Install bazelisk
  3. Build the repo:
    ./bazel build //...
    ./bazel test //...
    
  4. Add/remove dependencies in MODULE.bazel
    • See instructions in this file for re-generating the pinned dependency file.

Features

  • Flat project layout, one BUILD file per directory.
  • Works with IntelliJ plugin
  • Uses bazelisk to pin the version of bazel
    • See .bazelversion
  • Uses rules_jvm_external for external maven dependencies (guava, junit, dagger)
    • This supports transitive deps
    • Downloads 3rd party source code (e.g. for IntelliJ)
  • BUILD/Java formatter
  • Logging via log4j2
  • REST
  • JUnit4 + AssertJ tests
    • Run junit tests with a simple glob (technically not a best practice, but more ergonomic)
  • JMH microbenchmarks

TODO (WIP):

  • Protobuf / gRPC examples
  • Metrics / Tracing
  • Java 20 / Loom preview

About

Bazel java example project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 63.2%
  • Starlark 33.5%
  • Shell 3.3%
0