-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
app.bzl
152 lines (145 loc) · 4.66 KB
/
app.bzl
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode")
load("@rules_erlang//:filegroup.bzl", "filegroup")
def all_beam_files(name = "all_beam_files"):
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/Elixir.RabbitMQ.CLI.Ctl.Commands.ListWebMqttConnectionsCommand.erl",
"src/rabbit_web_mqtt_app.erl",
"src/rabbit_web_mqtt_handler.erl",
"src/rabbit_web_mqtt_stream_handler.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "rabbitmq_web_mqtt",
dest = "ebin",
erlc_opts = "//:erlc_opts",
deps = [
"//deps/rabbit_common:erlang_app",
"//deps/rabbitmq_cli:erlang_app",
"//deps/rabbitmq_mqtt:erlang_app",
"@cowboy//:erlang_app",
],
)
def all_test_beam_files(name = "all_test_beam_files"):
filegroup(
name = "test_beam_files",
testonly = True,
srcs = [":test_other_beam"],
)
erlang_bytecode(
name = "test_other_beam",
testonly = True,
srcs = [
"src/Elixir.RabbitMQ.CLI.Ctl.Commands.ListWebMqttConnectionsCommand.erl",
"src/rabbit_web_mqtt_app.erl",
"src/rabbit_web_mqtt_handler.erl",
"src/rabbit_web_mqtt_stream_handler.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "rabbitmq_web_mqtt",
dest = "test",
erlc_opts = "//:test_erlc_opts",
deps = [
"//deps/rabbit_common:erlang_app",
"//deps/rabbitmq_cli:erlang_app",
"//deps/rabbitmq_mqtt:erlang_app",
"@cowboy//:erlang_app",
],
)
def all_srcs(name = "all_srcs"):
filegroup(
name = "all_srcs",
srcs = [":public_and_private_hdrs", ":srcs"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [":private_hdrs", ":public_hdrs"],
)
filegroup(
name = "priv",
srcs = ["priv/schema/rabbitmq_web_mqtt.schema"],
)
filegroup(
name = "public_hdrs",
)
filegroup(
name = "srcs",
srcs = [
"src/Elixir.RabbitMQ.CLI.Ctl.Commands.ListWebMqttConnectionsCommand.erl",
"src/rabbit_web_mqtt_app.erl",
"src/rabbit_web_mqtt_handler.erl",
"src/rabbit_web_mqtt_stream_handler.erl",
],
)
filegroup(
name = "private_hdrs",
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
"LICENSE-MPL-RabbitMQ",
],
)
def test_suite_beam_files(name = "test_suite_beam_files"):
erlang_bytecode(
name = "config_schema_SUITE_beam_files",
testonly = True,
srcs = ["test/config_schema_SUITE.erl"],
outs = ["test/config_schema_SUITE.beam"],
app_name = "rabbitmq_web_mqtt",
erlc_opts = "//:test_erlc_opts",
)
erlang_bytecode(
name = "proxy_protocol_SUITE_beam_files",
testonly = True,
srcs = ["test/proxy_protocol_SUITE.erl"],
outs = ["test/proxy_protocol_SUITE.beam"],
app_name = "rabbitmq_web_mqtt",
erlc_opts = "//:test_erlc_opts",
)
erlang_bytecode(
name = "system_SUITE_beam_files",
testonly = True,
srcs = ["test/system_SUITE.erl"],
outs = ["test/system_SUITE.beam"],
app_name = "rabbitmq_web_mqtt",
erlc_opts = "//:test_erlc_opts",
)
erlang_bytecode(
name = "test_src_rabbit_ws_test_util_beam",
testonly = True,
srcs = ["test/src/rabbit_ws_test_util.erl"],
outs = ["test/src/rabbit_ws_test_util.beam"],
app_name = "rabbitmq_web_mqtt",
erlc_opts = "//:test_erlc_opts",
)
erlang_bytecode(
name = "test_src_rfc6455_client_beam",
testonly = True,
srcs = ["test/src/rfc6455_client.erl"],
outs = ["test/src/rfc6455_client.beam"],
app_name = "rabbitmq_web_mqtt",
erlc_opts = "//:test_erlc_opts",
)
erlang_bytecode(
name = "command_SUITE_beam_files",
testonly = True,
srcs = ["test/command_SUITE.erl"],
outs = ["test/command_SUITE.beam"],
app_name = "rabbitmq_web_mqtt",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/amqp_client:erlang_app", "//deps/rabbitmq_mqtt:erlang_app"],
)
erlang_bytecode(
name = "test_rabbit_web_mqtt_test_util_beam",
testonly = True,
srcs = ["test/rabbit_web_mqtt_test_util.erl"],
outs = ["test/rabbit_web_mqtt_test_util.beam"],
app_name = "rabbitmq_web_mqtt",
erlc_opts = "//:test_erlc_opts",
)