-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bazel] Bump contrib_rules_jvm to 0.19.0
- Loading branch information
Showing
5 changed files
with
63 additions
and
7 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
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,29 @@ | ||
load("@contrib_rules_jvm//java/private:create_jvm_test_suite.bzl", "create_jvm_test_suite") | ||
load("@contrib_rules_jvm//java/private:java_test_suite_shared_constants.bzl", "DEFAULT_TEST_SUFFIXES") | ||
load("@contrib_rules_jvm//java/private:library.bzl", "java_library") | ||
load(":junit5_test.bzl", "junit5_test") | ||
|
||
def java_test_suite( | ||
name, | ||
srcs, | ||
runner = "junit5", | ||
test_suffixes = DEFAULT_TEST_SUFFIXES, | ||
package = None, | ||
deps = None, | ||
runtime_deps = [], | ||
size = None, | ||
**kwargs): | ||
create_jvm_test_suite( | ||
name, | ||
srcs = srcs, | ||
test_suffixes = test_suffixes, | ||
package = package, | ||
define_library = java_library, | ||
# We want to use our own test runner | ||
define_test = junit5_test, | ||
runner = runner, | ||
deps = deps, | ||
runtime_deps = runtime_deps, | ||
size = size, | ||
**kwargs | ||
) |
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,27 @@ | ||
load("@contrib_rules_jvm//java:defs.bzl", "java_test") | ||
load("@contrib_rules_jvm//java/private:package.bzl", "get_package_name") | ||
|
||
def junit5_test( | ||
name, | ||
test_class = None, | ||
runtime_deps = [], | ||
package_prefixes = [], | ||
jvm_flags = [], | ||
**kwargs): | ||
if test_class: | ||
clazz = test_class | ||
else: | ||
clazz = get_package_name(package_prefixes) + name | ||
|
||
java_test( | ||
name = name, | ||
main_class = "com.github.bazel_contrib.contrib_rules_jvm.junit5.JUnit5Runner", | ||
test_class = clazz, | ||
runtime_deps = runtime_deps + [ | ||
"@contrib_rules_jvm//java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5", | ||
], | ||
jvm_flags = jvm_flags + ["-Djava.security.manager=allow"], | ||
**kwargs | ||
) | ||
|
||
return name |
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