{ok, VSN} = application:get_key(rebar, vsn),
[VSN1 | _] = string:tokens(VSN, "-"),
[Maj, Min, Patch] = string:tokens(VSN1, "."),
IsRebar3 = (list_to_integer(Maj) >= 3),

Rebar2Deps = [ {base64url, ".*", {git, "https://github.com/dvv/base64url", {tag, "v1.0"}}}
             , {jsx, ".*", {git, "https://github.com/talentdeficit/jsx", {tag, "2.8.0"}}}
             ],

case IsRebar3 of
    true -> CONFIG;
    false -> lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps})
end.
