-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1a9911
commit 50ce2bd
Showing
18 changed files
with
1,442 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
# We should probably create a standalone test module, but for now we'll just run our in-repo tests. | ||
bcr_test_module: | ||
matrix: | ||
platform: ["debian10", "macos", "ubuntu2004", "windows"] | ||
tasks: | ||
run_tests: | ||
name: "Run tests" | ||
gazelle: | ||
working_directory: "examples/gazelle" | ||
name: "Gazelle" | ||
platform: ${{ platform }} | ||
run_targets: | ||
- "//:gazelle" | ||
test_targets: | ||
- "//..." | ||
tests_and_lints: | ||
working_directory: "examples/tests_and_lints" | ||
name: "Tests and lints" | ||
platform: ${{ platform }} | ||
test_targets: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/bazel-* | ||
/MODULE.bazel.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
load("@gazelle//:def.bzl", "gazelle", "gazelle_binary") | ||
|
||
gazelle_binary( | ||
name = "gazelle_binary", | ||
languages = [ | ||
"@gazelle//language/proto:go_default_library", | ||
"@contrib_rules_jvm//java/gazelle", | ||
], | ||
visibility = ["//visibility:private"], | ||
) | ||
|
||
gazelle( | ||
name = "gazelle", | ||
gazelle = ":gazelle_binary", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module( | ||
name = "gazelle_example", | ||
version = "0.0.0", | ||
) | ||
|
||
bazel_dep( | ||
name = "contrib_rules_jvm", | ||
version = "0.0.0", | ||
) | ||
local_path_override( | ||
module_name = "contrib_rules_jvm", | ||
path = "../..", | ||
) | ||
|
||
bazel_dep( | ||
name = "bazel_skylib", | ||
version = "1.5.0", | ||
) | ||
bazel_dep( | ||
name = "rules_jvm_external", | ||
version = "5.3", | ||
) | ||
|
||
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") | ||
maven.install( | ||
name = "maven", | ||
artifacts = [ | ||
"org.junit.jupiter:junit-jupiter-api:5.8.2", | ||
"org.junit.jupiter:junit-jupiter-engine:5.8.2", | ||
"org.junit.platform:junit-platform-launcher:1.8.2", | ||
"org.junit.platform:junit-platform-reporting:1.8.2", | ||
], | ||
lock_file = "//:maven_install.json", | ||
) | ||
use_repo( | ||
maven, | ||
"maven", | ||
"unpinned_maven", | ||
) | ||
|
||
bazel_dep( | ||
name = "gazelle", | ||
version = "0.34.0", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This example contains java files which don't have BUILD targets for them. | ||
|
||
It requires running `bazel run :gazelle` to generate targets which can be built. | ||
|
||
There is a test using `genquery` which asserts that the right targets are generated. |
Oops, something went wrong.