Packages

High-performance HTTP/1.1, HTTP/2, HTTP/3 and WebSocket client for Erlang/OTP 27+

Current section

Files

Jump to
nhttpc rebar.config
Raw

rebar.config

{minimum_otp_vsn, "27"}.

{erl_opts, [
    debug_info,
    warn_missing_spec,
    warnings_as_errors
]}.

%% For standalone/production use: {nhttp_lib, "~> 0.1"}
%% In umbrella, nhttp_lib is resolved as a sibling app
{deps, [
    {opentelemetry_api, "1.4.0"},
    {opentelemetry_api_experimental, "0.5.1"},
    {nhttp_lib, "2.0.0"},
    {telemetry, "1.3.0"}
]}.

{project_plugins, [
    erlfmt,
    rebar3_hank,
    rebar3_ex_doc,
    rebar3_hex
]}.

{erlfmt, [write]}.

{hank, [
    {ignore, [
        %% Test files use CT callbacks with unused args
        "test/**",
        %% The load generator is a rebar3 project of its own with its own hank
        "soak/**",
        %% proc_lib/sys callbacks require unused arguments
        {"src/nhttpc_conn.erl", [unnecessary_function_arguments]},
        {"src/nhttpc_h3_conn.erl", [unnecessary_function_arguments]},
        {"src/nhttpc_ws.erl", [unnecessary_function_arguments]}
    ]}
]}.

{profiles, [
    {test, [
        {erl_opts, [nowarn_missing_spec]},
        {deps, [
            {meck, "1.2.0"},
            {nhttp, "1.2.1"},
            {triq, "1.3.0"}
        ]}
    ]}
]}.

{dialyzer, [
    {plt_extra_apps, [
        public_key,
        nhttp_lib,
        nquic,
        opentelemetry_api,
        opentelemetry_api_experimental,
        telemetry
    ]}
]}.

{xref_checks, [
    undefined_function_calls,
    undefined_functions,
    locals_not_used,
    deprecated_function_calls,
    deprecated_functions
]}.

{ct_opts, [{verbose, true}]}.
{cover_enabled, true}.
{cover_opts, [verbose]}.

{alias, [
    {check, [
        compile,
        {fmt, "--check"},
        xref,
        dialyzer,
        hank
    ]},
    {test, [
        ct,
        cover
    ]}
]}.

{ex_doc, [
    {source_url, <<"https://github.com/nomasystems/nhttpc">>},
    {homepage_url, <<"https://github.com/nomasystems/nhttpc">>},
    {extras, [
        {<<"README.md">>, #{title => <<"Overview">>}},
        {<<"CHANGELOG.md">>, #{title => <<"Changelog">>}},
        {<<"LICENSE">>, #{title => <<"License">>}}
    ]},
    {main, <<"README.md">>},
    {api_reference, true},
    %% Public surface = nhttpc + nhttpc_cookie_jar. Everything else is an
    %% implementation module.
    {filter_modules, <<"^(nhttpc|nhttpc_cookie_jar)$">>},
    {groups_for_modules, [
        {<<"Public API">>, [
            nhttpc,
            nhttpc_cookie_jar
        ]}
    ]}
]}.

{hex, [
    {doc, ex_doc},
    {build_tools, ["rebar3"]},
    {files, [
        "src",
        "rebar.config",
        "README.md",
        "LICENSE",
        "CHANGELOG.md"
    ]}
]}.