{erl_opts, [debug_info, warnings_as_errors]}.

{deps, [
    {nova_auth, "~> 0.1"},
    {nova, "~> 0.14"},
    {oidcc, "~> 3.7"}
]}.

%% Exclude Elixir-only transitive deps from oidcc
{overrides, [
    {override, oidcc, [
        {deps, [
            {jose, "~> 1.11"},
            {telemetry, "~> 1.2"},
            {telemetry_registry, "~> 0.3"}
        ]}
    ]}
]}.

{project_plugins, [
    erlfmt,
    rebar3_ex_doc,
    rebar3_lint,
    rebar3_hank,
    {rebar3_audit, {git, "https://github.com/Taure/rebar3_audit.git", {branch, "main"}}},
    {rebar3_sbom,
        {git, "https://github.com/Taure/rebar3_sbom.git", {branch, "feat/include-otp-components"}}},
    covertool
]}.

{erlfmt, [write]}.

{dialyzer, [
    {warnings, [error_handling, unmatched_returns, unknown]},
    {plt_extra_apps, [cowboy]},
    {plt_apps, all_deps}
]}.

{xref_checks, [undefined_function_calls, undefined_functions]}.
{xref_ignores, [
    {nova_auth_oidc, config, 1},
    {nova_auth_oidc_controller, login, 1},
    {nova_auth_oidc_controller, callback, 1}
]}.

{ct_opts, [
    {dir, "test"},
    {extra_src_dirs, ["test"]}
]}.

{profiles, [
    {test, [
        {erl_opts, [debug_info, nowarn_export_all]},
        {deps, [meck]}
    ]}
]}.

{cover_enabled, true}.

{hex, [{doc, #{provider => ex_doc}}]}.

{ex_doc, [
    {source_url, <<"https://github.com/novaframework/nova_auth_oidc">>},
    {main, <<"readme">>},
    {extras, [
        <<"README.md">>,
        <<"guides/getting-started.md">>,
        <<"guides/configuration.md">>,
        <<"guides/jwt-bearer.md">>,
        <<"guides/claims-mapping.md">>,
        <<"guides/client-credentials.md">>
    ]},
    {groups_for_extras, [
        {<<"Guides">>, [
            <<"guides/getting-started.md">>,
            <<"guides/configuration.md">>,
            <<"guides/jwt-bearer.md">>,
            <<"guides/claims-mapping.md">>,
            <<"guides/client-credentials.md">>
        ]}
    ]}
]}.
