{erl_opts, [warn_unused_import, warn_export_vars, verbose, report, debug_info]}.

{minimum_otp_vsn, "26"}.

{deps, [
    {cowboy, "~> 2.10"},
    {oidcc, "~> 3.0"},
    %% TODO: Switch to official package once this PR is merged and released:
    %% https://github.com/chvanikoff/cowboy_session/pull/3
    {cowboy_session, "~> 2.0", {pkg, oidcc_cowboy_session}}
]}.

{project_plugins, [
    %% Revert back to released version when this PR is merged & released:
    %% https://github.com/markusn/coveralls-erl/pull/36
    {coveralls, ".*",
        {git, "https://github.com/RoadRunnr/coveralls-erl.git", {branch, "feature/git-info"}}},
    erlfmt,
    rebar3_hank,
    rebar3_lint,
    rebar3_hex,
    rebar3_ex_doc
]}.

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

{validate_app_modules, true}.

{hank, [
    {ignore, [
        {"src/{oidcc_cowboy_load_userinfo,oidcc_cowboy_introspect_token,oidcc_cowboy_extract_authorization,oidcc_cowboy_validate_jwt_token}.erl",
            [unnecessary_function_arguments]},
        {"src/oidcc_cowboy_cache.erl", [unused_callbacks]},
        {"test/**/*_SUITE.erl", [unnecessary_function_arguments]},
        "include/**/*.hrl"
    ]}
]}.

{ex_doc, [
    {extras, [
        {"README.md", #{title => "Overview"}},
        {"LICENSE", #{title => "License"}}
    ]},
    {main, "README.md"},
    {homepage_url, "https://github.com/erlef/oidcc_cowboy"},
    {source_url, "https://github.com/erlef/oidcc_cowboy"},
    {logo, "assets/logo.svg"},
    {assets, "assets"}
]}.

{profiles, [
    {test, [
        {deps, [{meck, "~> 0.9"}]},
        {cover_enabled, true},
        {cover_export_enabled, true},
        {coveralls_coverdata, "_build/test/cover/*.coverdata"},
        {coveralls_service_name, "github"},
        {cover_opts, [verbose]}
    ]}
]}.

{erlfmt, [
    write,
    {files, [
        "{src,include,test}/*.{hrl,erl,app.src}",
        "rebar.config",
        "example/{src,include,test}/*.{hrl,erl,app.src}",
        "example/rebar.config"
    ]}
]}.

{shell, [{apps, [oidcc_cowboy]}]}.
