{erl_opts, [
    debug_info,
    {i, "include"},
    warnings_as_errors,
    warn_unused_vars,
    warn_export_all,
    warn_shadow_vars,
    warn_unused_import,
    warn_unused_function,
    warn_bif_clash,
    warn_unused_record,
    warn_deprecated_function,
    warn_obsolete_guard,
    warn_export_vars,
    warn_exported_vars
]}.

%% Dependencies
%% For hex.pm release:
{deps, [{macula_tweann, "~> 0.11.3"}]}.
%% For development, use _checkouts symlink instead:
%% mkdir -p _checkouts && ln -sf ../macula-tweann _checkouts/macula_tweann

%% Project plugins
{project_plugins, [
    rebar3_hex,
    rebar3_ex_doc
]}.

%% Documentation with ex_doc
{ex_doc, [
    {extras, [
        {"guides/overview.md", #{title => "Overview"}},
        {"guides/getting-started.md", #{title => "Getting Started"}},
        {"guides/custom-evaluator.md", #{title => "Custom Evaluators"}},
        {"guides/meta-controller.md", #{title => "LTC Meta-Controller"}},
        {"guides/liquid-conglomerate.md", #{title => "The Liquid Conglomerate"}},
        {"guides/topology-evolution.md", #{title => "Topology Evolution Roadmap"}},
        {"guides/interoperability.md", #{title => "Interoperability"}},
        {"guides/inference-scenarios.md", #{title => "Inference Scenarios"}},
        {"guides/swarm-robotics.md", #{title => "Swarm Robotics"}},
        {"README.md", #{title => "README"}}
    ]},
    {assets, #{"guides/assets" => "assets"}},
    {main, "overview"},
    {source_url, "https://github.com/macula-io/macula-neuroevolution"},
    {prefix_ref_vsn_with_v, false}
]}.

%% Hex.pm package metadata
{hex, [
    {doc, #{provider => ex_doc}},
    {files, [
        "src",
        "include",
        "guides",
        "rebar.config",
        "rebar.lock",
        "README.md",
        "LICENSE"
    ]}
]}.

%% Test configuration
{eunit_opts, [
    verbose,
    {report, {eunit_surefire, [{dir, "_build/test/logs"}]}}
]}.

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

%% Dialyzer configuration
{dialyzer, [
    {warnings, [
        unmatched_returns,
        error_handling,
        unknown
    ]},
    {plt_apps, top_level_deps},
    {plt_location, local},
    {base_plt_location, global}
]}.

%% Profiles
{profiles, [
    {test, [
        {erl_opts, [
            debug_info,
            nowarn_export_all,
            {i, "include"}
        ]},
        {deps, []},
        {extra_src_dirs, [
            "test"
        ]}
    ]}
]}.

%% Shell configuration
{shell, [
    {apps, [macula_neuroevolution]}
]}.

%% Documentation
{edoc_opts, [
    {title, "Macula Neuroevolution - Population-Based Evolutionary Training"},
    {source_path, ["src"]},
    {includes, ["include"]}
]}.

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