aboutsummaryrefslogtreecommitdiff
path: root/java/org/brotli/wrapper/common/BUILD
blob: 8623272fc22de120189265b717320e3eaf86d065 (plain)
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
package(default_visibility = ["//visibility:public"])

licenses(["notice"])  # MIT

filegroup(
    name = "jni_src",
    srcs = ["common_jni.cc"],
)

#########################################
# WARNING: do not depend on this target!
#########################################
java_library(
    name = "common_no_dictionary_data",
    srcs = glob(
        ["*.java"],
        exclude = ["*Test*.java"],
    ),
    deps = ["//:jni_no_dictionary_data"],
)

#########################################
# WARNING: do not depend on this target!
#########################################
java_library(
    name = "common",
    srcs = glob(
        ["*.java"],
        exclude = ["*Test*.java"],
    ),
    deps = ["//:jni"],
)

java_test(
    name = "SetZeroDictionaryTest",
    size = "small",
    srcs = ["SetZeroDictionaryTest.java"],
    data = ["//:jni_no_dictionary_data"],  # Bazel JNI workaround
    deps = [
        ":common_no_dictionary_data",
        "//java/org/brotli/wrapper/dec",
        "@junit_junit//jar",
    ],
)

filegroup(
    name = "rfc_dictionary",
    srcs = ["//:dictionary"],
)

java_test(
    name = "SetRfcDictionaryTest",
    size = "small",
    srcs = ["SetRfcDictionaryTest.java"],
    data = [
        ":rfc_dictionary",
        "//:jni_no_dictionary_data",  # Bazel JNI workaround
    ],
    jvm_flags = ["-DRFC_DICTIONARY=$(location :rfc_dictionary)"],
    deps = [
        ":common_no_dictionary_data",
        "//java/org/brotli/wrapper/dec",
        "@junit_junit//jar",
    ],
)