{deps, []}.

{dialyzer,
 [{warnings,
   [unknown,
    unmatched_returns,
    error_handling,
    underspecs
]}]}.

{profiles, [
    {test, [
        {deps, [
            {proper, "1.4.0"}
        ]},
        {plugins, [
            {rebar3_codecov, "0.6.0"}
        ]},
        {port_env, [
            {"CXXFLAGS", "$CXXFLAGS -O3 -std=c++11 -g -Wall -Wextra -fPIC --coverage"},
            {"LDFLAGS", "$LDFLAGS --coverage"}
        ]},
        {cover_enabled, true},
        {cover_export_enabled, true}
    ]}
]}.

{project_plugins, [rebar3_hex, rebar3_ex_doc]}.
{plugins, [pc]}.

% Interrupt compilation, if the artifact is not found
{artifacts, ["priv/exml_nif.so"]}.

{port_specs, [
    {
        % Any arch
        ".*",
        % Create library
        "priv/exml_nif.so",
        % From files
        ["c_src/*.cpp"],
        % Using options
        [{env, [{"CXXFLAGS", "$CXXFLAGS -O3 -std=c++11 -Wall -Wextra"}]}]
    }
]}.

{provider_hooks, [
    {post, [
        {compile, {pc, compile}},
        {clean, {pc, clean}}
     ]}
]}.

{hex, [
    {doc, #{provider => ex_doc}}
]}.
{ex_doc, [
     {source_url, <<"https://github.com/esl/exml">>},
     {main, <<"readme">>},
     {extras, [{'README.md', #{title => <<"README">>}},
               {'LICENSE', #{title => <<"License">>}}
              ]}
]}.
