IsRebar3 = erlang:function_exported(rebar3, main, 1),

case IsRebar3 of
    true ->
        CONFIG;
    false ->
        Rebar3Deps = proplists:get_value(deps, CONFIG),
        Rebar2Deps = [
            {supervisor3, ".*",
                {git, "https://github.com/klarna/supervisor3",
                    {tag, proplists:get_value(supervisor3, Rebar3Deps)}}},
            {kafka_protocol, ".*",
                {git, "https://github.com/klarna/kafka_protocol.git",
                    {tag, proplists:get_value(kafka_protocol, Rebar3Deps)}}}
        ],
        lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps})
end.
