{eunit_opts, [verbose]}.
{deps, []}.

{project_plugins, [
    rebar3_ex_doc
]}.

{hex, [{doc, ex_doc}]}.

{ex_doc, [
    {source_url, <<"https://github.com/benoitc/erlang-duktape">>},
    {extras, [<<"README.md">>, <<"CHANGELOG.md">>, <<"LICENSE">>]},
    {main, <<"readme">>},
    {api_reference, true}
]}.

{pre_hooks, [
    {clean, "rm -f priv/*.so priv/*.dylib"},
    {clean, "rm -rf _build/cmake"},
    {"(linux|darwin|solaris)", compile, "./do_cmake.sh $DUCKTAPE_OPTS"},
    {"(freebsd|netbsd|openbsd)", compile, "./do_cmake.sh $DUCKTAPE_OPTS"},
    {"win32", compile, "mkdir _build\\cmake & cd _build\\cmake & cmake ..\\..\\c_src"}
]}.

{post_hooks, [
    {"(linux|darwin|solaris)", compile, "./do_build.sh $DUCKTAPE_BUILDOPTS"},
    {"(freebsd|netbsd|openbsd)", compile, "./do_build.sh $DUCKTAPE_BUILDOPTS"},
    {"win32", compile, "cmake --build _build\\cmake --config Release --parallel"}
]}.

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

{profiles, [
    {bench, [
        {erl_opts, [debug_info, {d, 'BENCHMARK'}]},
        {extra_src_dirs, ["bench"]}
    ]}
]}.
