Skip to content

Commit

Permalink
Add Bzlmod docs to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Bencodes committed Oct 4, 2023
1 parent ef99eb6 commit afe29c9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ for [the Bazel build system](https://bazel.build).

## Usage



### `MODULE.bazel` Configuration

```starlark
bazel_dep(name = "rules_pmd", version = "...")
```

### `WORKSPACE` Configuration

Declare the rule in the `WORKSPACE` file.
Expand Down Expand Up @@ -35,10 +43,10 @@ rules_pmd_toolchains()
Once declared in the `WORSKPACE` file, the rule can be loaded in the `BUILD` file.

```starlark
load("@rules_pmd//pmd:defs.bzl", "pmd")
load("@rules_pmd//pmd:defs.bzl", "pmd_test")

pmd(
name = "pmd_analysis",
pmd_test(
name = "pmd_analysis_test",
srcs = glob(["src/main/java/**/*.java"]),
)
```
Expand Down

0 comments on commit afe29c9

Please sign in to comment.