-
Notifications
You must be signed in to change notification settings - Fork 514
/
Copy pathBUILD.bazel
55 lines (50 loc) · 1.25 KB
/
BUILD.bazel
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
load("@rules_java//java:defs.bzl", "java_library", "java_plugin", "java_test")
java_library(
name = "mapstruct-on-bazel",
srcs = glob(["src/main/java/**/*.java"]),
resources = glob(["src/main/resources/**"]),
deps = [
":mapstruct",
],
)
java_library(
name = "tests",
srcs = glob(["src/test/java/**/*.java"]),
resources = glob(["src/test/resources/**"]),
deps = [
":mapstruct-on-bazel",
"@maven//:junit_junit",
"@maven//:org_easytesting_fest_assert",
],
)
java_test(
name = "ConversionTest",
test_class = "org.mapstruct.example.ConversionTest",
runtime_deps = [
":tests",
],
)
java_library(
name = "mapstruct",
exported_plugins = [
":mapstruct_plugin",
],
neverlink = True,
visibility = ["//visibility:public"],
exports = [
"@maven//:org_mapstruct_mapstruct",
"@maven//:org_mapstruct_mapstruct_processor",
],
runtime_deps = [
# add to runtime, as we need
"@maven//:org_mapstruct_mapstruct",
],
)
java_plugin(
name = "mapstruct_plugin",
generates_api = True,
processor_class = "org.mapstruct.ap.MappingProcessor",
deps = [
"@maven//:org_mapstruct_mapstruct_processor",
],
)