-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.bazel
More file actions
77 lines (71 loc) · 2.51 KB
/
Copy pathBUILD.bazel
File metadata and controls
77 lines (71 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
load("@rules_java//java:defs.bzl", "java_library", "java_plugin", "java_test")
# USSI Java library skeleton.
# - NamespaceConfig : config + validation
# - NearestNeighborSearchIndex : top-level `new(config)` facade
# - TermsAndValues : platform-agnostic record representation
# - SearchResults : ordered rowNums plus parallel similarity scores
# - ScanCache : writable sequential-scan cache
java_plugin(
name = "lombok_processor",
generates_api = True,
processor_class = "lombok.launch.AnnotationProcessorHider$AnnotationProcessor",
deps = ["@maven//:org_projectlombok_lombok"],
)
# Lombok is compile-time only (annotations are stripped by the processor),
# so it must not leak into the runtime classpath.
java_library(
name = "lombok_compile_only",
neverlink = True,
exports = ["@maven//:org_projectlombok_lombok"],
)
java_library(
name = "src_main",
srcs = glob(["src/main/java/**/*.java"]),
plugins = [":lombok_processor"],
visibility = ["//visibility:public"],
runtime_deps = [
# Native openblas binaries, loaded by javacpp at runtime.
"@maven//:org_bytedeco_openblas_linux_arm64",
"@maven//:org_bytedeco_openblas_linux_x86_64",
"@maven//:org_bytedeco_openblas_macosx_x86_64",
],
deps = [
":lombok_compile_only",
"@maven//:com_carrotsearch_hppc",
"@maven//:com_google_code_findbugs_jsr305",
"@maven//:com_google_guava_guava",
"@maven//:jakarta_validation_jakarta_validation_api",
"@maven//:org_apache_commons_commons_math3",
"@maven//:org_bytedeco_javacpp",
"@maven//:org_bytedeco_openblas",
],
)
java_library(
name = "test_lib",
testonly = True,
srcs = glob(["src/test/java/**/*.java"]),
deps = [
":src_main",
"@maven//:com_carrotsearch_hppc",
"@maven//:org_bytedeco_javacpp",
"@maven//:org_bytedeco_openblas",
"@maven//:org_junit_jupiter_junit_jupiter_api",
],
)
java_test(
name = "test_main",
args = [
"execute",
# JUnit only scans directories by default; point it at the test jar.
"--scan-classpath=$(rootpath :test_lib)",
"--fail-if-no-tests",
],
data = [":test_lib"],
main_class = "org.junit.platform.console.ConsoleLauncher",
use_testrunner = False,
runtime_deps = [
":test_lib",
"@maven//:org_junit_jupiter_junit_jupiter_engine",
"@maven//:org_junit_platform_junit_platform_console",
],
)