%% barrel_server is built as part of the umbrella via the top-level `server`
%% profile (it adds apps/barrel_server to project_app_dirs). The `barrel`
%% facade resolves as a sibling umbrella app; livery is pulled from Hex.
{erl_opts, [
    debug_info,
    warnings_as_errors
]}.

{cover_enabled, true}.

{deps, [
    {livery, "0.6.1"},
    %% exact pin: the MCP engine livery_mcp bridges to (inside livery's
    %% barrel_mcp constraint; rebar fails loudly on conflict)
    {barrel_mcp, "2.3.0"},
    %% Sibling apps, and hard runtime deps (in this app's `applications').
    %% They must be default-profile deps: rebar3_hex reads the package's
    %% requirements from the default lock, so a `hex' profile dep is dropped.
    {barrel, "~> 1.0"},
    {barrel_spaces, "~> 1.0"}
]}.

{shell, [
    {apps, [barrel_server]}
]}.

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

{project_plugins, [rebar3_hex, rebar3_ex_doc]}.

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

{ex_doc, [
    {source_url, <<"https://github.com/barrel-db/barrel">>},
    {homepage_url, <<"https://barrel-db.eu">>},
    {logo, "assets/logo.png"},
    {extras, [
        <<"README.md">>,
        <<"CHANGELOG.md">>,
        <<"LICENSE">>
    ]},
    {main, <<"readme">>},
    {api_reference, true},
    {groups_for_extras, [
        {<<"About">>, [<<"CHANGELOG.md">>, <<"LICENSE">>]}
    ]},
    {before_closing_head_tag, #{html => "<style>
      :root {
        --main: #006B77; --mainDark: #00565F; --mainDarkest: #003D44;
        --mainLight: #75B6B2; --mainLightest: #E6F2F3;
        --link-color: #C65E59; --link-visited-color: #C65E59;
        --sidebarAccentMain: #C65E59; --searchAccentMain: #C65E59;
      }
      body.dark {
        --main: #75B6B2; --mainDark: #006B77; --mainDarkest: #003D44;
        --mainLight: #9BCECB; --mainLightest: #123033;
        --link-color: #E0837E; --link-visited-color: #E0837E;
        --sidebarAccentMain: #E0837E; --searchAccentMain: #E0837E;
      }
    </style>"}}
]}.

