{erl_opts, [debug_info, warnings_as_errors]}.
%% `livery` and its transitive deps (hackney, h1, h2, ...) are fetched from
%% hex. The `~> 0.4.1` constraint allows patch-level updates (< 0.5.0).
{deps, [{livery, "~> 0.4.1"}]}.
{shell, [
{config, "config/sys.config"},
{apps, [livery_stripe]}
]}.
{cover_enabled, true}.
{cover_opts, [verbose]}.
{eunit_opts, [verbose]}.
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls
]}.
{dialyzer, [
{warnings, [unmatched_returns, error_handling, unknown]},
{plt_extra_apps, [livery, hackney, crypto, ssl, public_key]}
]}.
{project_plugins, [
{erlfmt, "1.7.0"},
{rebar3_lint, "4.1.1"},
rebar3_ex_doc
]}.
{erlfmt, [
write,
{files, [
"{src,include,test}/**/*.{hrl,erl,app.src}",
"rebar.config"
]}
]}.
{ex_doc, [
{source_url, <<"https://github.com/benoitc/livery_stripe">>},
{main, <<"readme">>},
{extras, [
{"README.md", #{title => <<"Overview">>}},
{"docs/overview.md", #{title => <<"What you can build">>}},
{"docs/guides/getting-started.md", #{title => <<"Getting started">>}},
{"docs/guides/subscriptions.md", #{title => <<"Subscription billing">>}},
{"docs/guides/payments.md", #{title => <<"One-time payments">>}},
{"docs/guides/saving-cards.md", #{title => <<"Saving cards">>}},
{"docs/guides/discounts.md", #{title => <<"Discounts and promotions">>}},
{"docs/guides/invoicing.md", #{title => <<"Invoicing">>}},
{"docs/guides/sepa-payments.md", #{title => <<"SEPA Direct Debit">>}},
{"docs/guides/webhooks.md", #{title => <<"Webhooks">>}},
{"CHANGELOG.md", #{title => <<"Changelog">>}}
]},
{groups_for_extras, [
{<<"Guides">>, [<<"docs/">>]}
]},
{groups_for_modules, [
{<<"Client and configuration">>, [livery_stripe, livery_stripe_client]},
{<<"Resources">>, [
livery_stripe_customer,
livery_stripe_product,
livery_stripe_price,
livery_stripe_checkout,
livery_stripe_portal,
livery_stripe_subscription,
livery_stripe_payment_intent,
livery_stripe_payment_method,
livery_stripe_setup_intent,
livery_stripe_refund,
livery_stripe_invoice,
livery_stripe_coupon,
livery_stripe_promotion_code,
livery_stripe_event
]},
{<<"Webhooks">>, [livery_stripe_webhook, livery_stripe_webhook_handler]},
{<<"Internal">>, [
livery_stripe_form,
livery_stripe_util,
livery_stripe_app,
livery_stripe_sup
]}
]}
]}.
{hex, [{doc, #{provider => ex_doc}}]}.
{elvis, [
#{
dirs => ["src"],
filter => "*.erl",
rules => [
{elvis_style, no_macros, disable},
{elvis_style, no_common_caveats_call, disable},
{elvis_style, no_init_lists, disable},
{elvis_style, param_pattern_matching, disable}
],
ruleset => erl_files_strict
},
#{
dirs => ["."],
filter => "rebar.config",
rules => [
{elvis_project, no_branch_deps, disable}
],
ruleset => rebar_config
}
]}.
{profiles, [
{test, [
{erl_opts, [debug_info, nowarn_export_all]}
]}
]}.