forked from esl/MongooseIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebar.config
230 lines (198 loc) · 8.64 KB
/
rebar.config
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
{erl_opts, [debug_info,
{i, ["include"]},
{d, xml_nif},
{d, namespaced_types},
{platform_define, "^(20)", fun_stacktrace}]}.
%% For behaviour info
{erl_first_files, [
"src/gen_mod.erl",
"src/mod_event_pusher_sns.erl"
]}.
{xref_checks, [undefined_function_calls,
undefined_functions,
locals_not_used,
exports_not_used,
deprecated_function_calls,
deprecated_functions]}.
{xref_ignores, [
eldap_filter_yecc, 'XmppAddr', mongoose_xmpp_errors,
%% *_backend
mod_bosh_backend,
mod_global_distrib_mapping_backend,
mod_pubsub_db_backend,
mod_shared_roster,
%% Deprecated functions
{crypto, rand_uniform, 2},
{ranch, start_listener, 6},
{ranch, accept_ack, 1},
{mongoose_lib, deprecated_logging, 1},
{sys, get_debug, 3},
{httpd_util, integer_to_hexlist, 1}
]}.
{port_specs,
[
{".*", "priv/lib/ejabberd_zlib_drv.so", ["c_src/ejabberd_zlib_drv.c"], [{env, [{"LDFLAGS", "$LDFLAGS -lz"}]}]},
{".*", "priv/lib/mongoose_mam_id.so", ["c_src/mongoose_mam_id.cpp"], [{env, [{"CXXFLAGS", "$CXXFLAGS -O3 -std=c++11"}]}]}
]}.
{require_min_otp_vsn, "21"}.
%% We agreed to use https:// for deps because of possible firewall issues.
%%
%% If you still prefer git protocol, update your "~/.gitconfig" by running:
%% git config --global url."git://github".insteadOf https://github
{deps,
[
%%% Stateless parsers
{base16, "2.0.1"},
{exml, "3.2.1", {pkg, hexml}},
{jiffy, "1.1.1"},
{jid, "2.0.0", {pkg, mongoose_jid}},
{tomerl, "0.5.0"},
{bbmustache, "1.12.2"},
{erl_csv, "0.3.1"},
%%% Observability
{telemetry, "1.0.0"},
{lager, "3.9.2"}, % We're keeping this to override the dependencies
{exometer_core, {git, "https://github.com/esl/exometer_core.git", {branch, "master"}}},
{exometer_report_graphite, {git, "https://github.com/esl/exometer_report_graphite.git", {branch, "master"}}},
{exometer_report_statsd, {git, "https://github.com/esl/exometer_report_statsd.git", {branch, "master"}}},
{syslogger, "0.3.0"},
{flatlog, "0.1.2"},
%%% Stateless libraries
{fast_tls, "1.1.13"},
{fast_scram, "0.4.4"},
{idna, "6.1.1"},
{uuid, "2.0.4", {pkg, uuid_erl}},
{gen_fsm_compat, "0.3.0"},
%%% Stateful apps
{cache_tab, "1.0.29"},
{segmented_cache, "0.2.0"},
{worker_pool, "6.0.1"},
%%% HTTP tools
{graphql, {git, "https://github.com/esl/graphql-erlang.git", {branch, "mu-fix-unknown-types"}}},
{cowboy, "2.9.0"},
{gun, "1.3.3"},
{fusco, "0.1.1"},
{lasse, "1.2.0"},
{trails, "2.3.0"},
{cowboy_swagger, "2.5.0"},
%%% Outgoing pools
%% We use a git repo here, because HEX packet pulls riak_pb version
%% that recompiles its files on each run of "rebar3 compile" (which slows down development)
{riakc, {git, "https://github.com/basho/riak-erlang-client.git", {branch, "2.5.3"}}},
{cqerl, {git, "https://github.com/esl/cqerl.git", {branch, "master"}}},
{mysql, "1.8.0"},
{epgsql, "4.6.0"},
{eodbc, "0.1.0"},
{tirerl, "1.1.0"},
{amqp_client, "3.9.11"},
{eredis, "1.2.0"},
{erlcloud, "3.5.11"},
%%% Internal monitoring and debugging tools
{recon, "2.5.2"},
{observer_cli, "1.7.1"},
%%% Testing deps
{proper, "1.4.0"},
{meck, "0.8.13"},
%%% Other
{pa, {git, "https://github.com/erszcz/pa.git", {branch, "master"}}},
{jwerl, "1.2.0"},
{cpool, "0.1.0"}, %% Do not upgrade cpool to version 0.1.1, it has bugs
{nkpacket, {git, "https://github.com/michalwski/nkpacket.git", {ref, "f7c5349"}}},
{nksip, {git, "https://github.com/arcusfelis/nksip.git", {branch, "mu-fix-dialyzer"}}}
]}.
{relx, [{release, { mongooseim, {cmd, "cat VERSION | tr -d '\r\n'"} },
[]}, %%Apps list is dynamicaly set by rebar.config.script
{dev_mode, true},
%% TODO: extra copies waste space, but mongooseim script requires the files in a certain place
{include_erts, true},
{generate_start_script, false},
{extended_start_script, false},
%% Don't forget to update tools/test_runner/apply_templates.erl, when changing templates
{overlay, [
{mkdir, "priv/ssl"},
{copy, "tools/ssl/mongooseim/cert.pem", "priv/ssl/fake_cert.pem"},
{copy, "tools/ssl/mongooseim/key.pem", "priv/ssl/fake_key.pem"},
{copy, "tools/ssl/mongooseim/server.pem", "priv/ssl/fake_server.pem"},
{copy, "tools/ssl/mongooseim/dh_server.pem", "priv/ssl/fake_dh_server.pem"},
{copy, "tools/ssl/ca/cacert.pem", "priv/ssl/cacert.pem"},
%% Copy the whole directory scripts into scripts.
%% Still works, if the destination "scripts/" directory exists.
{copy, "rel/files/scripts", "./"},
{copy, "rel/files/templates", "./"},
{copy, "rel/files/templates.ini", "etc/templates.ini"},
{template, "rel/files/nodetool", "erts-\{\{erts_vsn\}\}/bin/nodetool"},
{template, "rel/files/mongooseim", "bin/mongooseim"},
{template, "rel/files/mongooseimctl", "bin/mongooseimctl"},
{template, "rel/files/app.config", "etc/app.config"},
{template, "rel/files/vm.args", "etc/vm.args"},
{template, "rel/files/vm.dist.args", "etc/vm.dist.args"},
{copy, "priv/logo.txt", "priv/logo.txt"},
{copy, "VERSION", "priv/VERSION"}
]}
]}.
{dist_node,
[{setcookie, mongooseim},
{sname, 'mongooseim@localhost'}
]}.
{profiles, [ {prod, [{relx, [ {dev_mode, false},
{overlay_vars, "rel/prod.vars-toml.config"},
{overlay, [{template, "rel/files/mongooseim.toml", "etc/mongooseim.toml"}]} ]},
{erl_opts, [{d, 'PROD_NODE'}]} ]},
%% development nodes
{mim1, [{relx, [ {overlay_vars, "rel/mim1.vars-toml.config"},
{overlay, [{template, "rel/files/mongooseim.toml", "etc/mongooseim.toml"}]} ]}]},
{mim2, [{relx, [ {overlay_vars, "rel/mim2.vars-toml.config"},
{overlay, [{template, "rel/files/mongooseim.toml", "etc/mongooseim.toml"}]} ]}]},
{mim3, [{relx, [ {overlay_vars, "rel/mim3.vars-toml.config"},
{overlay, [{template, "rel/files/mongooseim.toml", "etc/mongooseim.toml"}]} ]}]},
{fed1, [{relx, [ {overlay_vars, "rel/fed1.vars-toml.config"},
{overlay, [{template, "rel/files/mongooseim.toml", "etc/mongooseim.toml"}]} ]}]},
{reg1, [{relx, [ {overlay_vars, "rel/reg1.vars-toml.config"},
{overlay, [{template, "rel/files/mongooseim.toml", "etc/mongooseim.toml"}]} ]}]},
{test, [{extra_src_dirs, [{"test", [{recursive, true}]}]}]}
]}.
{plugins,
[
{pc, "1.14.0"},
{provider_asn1, "0.3.0"},
{rebar3_codecov, "0.3.0"},
{rebar3_lint, "1.0.1"}
]}.
{provider_hooks,
[{pre, [{compile, {asn, compile}}, {compile, {pc, compile}}]},
{post, [{clean, {asn, clean}}, {clean, {pc, clean}}]
}]}.
{overrides,
[{override, stringprep,
[ {provider_hooks,
[ {post, [ {compile, {pc, compile}},
{clean, {pc, clean}} ] }] } ]},
%% Disable unsupported plugins for hamcrest-erlang
{override, riakc, [{erl_opts, [debug_info,
{d, namespaced_types},
{d, deprecated_now},
{d, deprecated_19}]}]},
{override, hamcrest, [{plugins, []}]},
{del, eper, [{erl_opts, [warnings_as_errors]}]},
%% Erlang JWT Library is in elixir and wants elvis for tests
%% Remove elvis plugin to reduce deps
{override, jwerl, [{plugins, [rebar3_elixir, rebar3_hex]}]}
]}.
{dialyzer, [
%% Disabled till mod_pubsub is converted to dynamic domains style
% {warnings, [unknown]},
{plt_extra_apps, [jid, cowboy, cowlib, lasse, p1_utils, ranch, gen_fsm_compat, epgsql, cqerl,
common_test, tools, amqp_client, jiffy, erl_csv, inets, compiler, jsx,
riakc, mysql, eredis, erlcloud, eodbc, telemetry,
nksip, nklib, nkservice, nkpacket]}]}.
{cover_print_enabled, true}.
{cover_export_enabled, true}.
{coveralls_coverdata, "/tmp/*.coverdata"}.
{coveralls_service_name, "github"}.
{coveralls_parallel, true}.
{codecov_opts,
[
%% Assuming /tmp/mongoose_combined.coverdata
{path, ["/tmp", "_build/test/cover"]}
]}.
{edoc_opts, [{preprocess, true}, {dir, "edoc"}]}.