{ok, VSN} = application:get_key(rebar, vsn),
[Major|_] = string:tokens(VSN, "."),
GitDeps =
    [ {base64url, ".*", {git, "https://github.com/dvv/base64url", {tag, "v1.0"}}}
    , {jsx, ".*", {git, "https://github.com/talentdeficit/jsx", {tag, "2.8.0"}}}
    ],

case list_to_integer(Major) of
    3 -> CONFIG;
    _ -> lists:keyreplace(deps, 1, CONFIG, {deps, GitDeps})
end.
