Packages
kafka_protocol
4.0.3
4.3.4
4.3.3
4.3.2
4.3.1
4.3.0
4.2.9
4.2.8
4.2.7
4.2.6
4.2.5
4.2.4
4.2.3
4.2.2
4.2.1
4.2.0
4.1.10
4.1.9
4.1.8
4.1.7
4.1.6
4.1.5
4.1.4
4.1.3
4.1.2
4.1.1
4.1.0
4.0.3
4.0.2
4.0.1
3.0.1
3.0.0
2.4.1
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
2.0.1
2.0.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0
0.9.2
0.9.1
0.9.0
0.8.0
0.7.8
0.7.7
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.0
0.4.0
0.3.2
0.3.1
0.2.3
Kafka protocol library for Erlang/Elixir
Current section
Files
Jump to
Current section
Files
kafka_protocol
rebar.config.script
rebar.config.script
{_, ErlOpts} = lists:keyfind(erl_opts, 1, CONFIG).
Rel = try erlang:system_info(otp_release) of
Vsn ->
{match,[Maj]} = re:run(Vsn, "^R?([0-9]+)", [{capture,[1],list}]),
list_to_integer(Maj)
catch _:_ ->
"OLD"
end,
Macros = if Rel < 19 ->
[{d, 'OLD_TIME_UNITS'}];
true ->
[]
end,
CONFIG1 = lists:keystore(erl_opts, 1, CONFIG, {erl_opts, Macros ++ ErlOpts}),
IsRebar3 = erlang:function_exported(rebar3, main, 1),
case IsRebar3 of
true ->
CONFIG1;
false ->
URLs = [ {snappyer, "https://github.com/zmstone/snappyer"}
, {crc32cer, "https://github.com/zmstone/crc32cer"}
],
Rebar3Deps = proplists:get_value(deps, CONFIG1),
Rebar2Deps =
lists:map(
fun({Name, URL}) ->
Tag = proplists:get_value(Name, Rebar3Deps),
{Name, ".*", {git, URL, {tag, Tag}}}
end, URLs),
lists:keyreplace(deps, 1, CONFIG1, {deps, Rebar2Deps})
end.