Skip to main content

rebar.config

{erl_opts, [debug_info]}.

%% The plugin uses triple-quoted doc strings (`-moduledoc`/`-doc """..."""`),
%% an OTP 27 language feature, so it compiles only on OTP 27 and up. (otter's
%% *NIF runtime* floor is lower — NIF 2.17 / OTP 26 — but that governs the
%% compiled NIF library loading into a BEAM, not this build-time plugin.)
{minimum_otp_vsn, "27"}.

%% No build dependencies. rebar3 puts the plugin API the plugin compiles
%% against — the `provider` behaviour plus `rebar_state` / `rebar_api` /
%% `rebar_app_info` — on the code path itself at plugin-build time, so
%% vendoring the rebar3 source (`{rebar, {git_subdir, ...}}`) is unnecessary.
%% Dropping it also keeps the plugin off rebar3's old transitive deps
%% (notably erlware_commons), which is what broke the build on newer OTP.
{deps, []}.

%% Hex docs are built with ex_doc (the rebar3_ex_doc plugin bundles the
%% escript, so no Elixir install is needed). `rebar3 hex publish` builds and
%% uploads them via this provider. Source links are intentionally omitted:
%% the modules live in the monorepo subdir rebar3_otter/src/, which ex_doc's
%% source_url cannot express without pointing at the wrong paths.
{hex, [{doc, ex_doc}]}.

{ex_doc, [
    {extras, ["README.md", "DESIGN.md", "LICENSE-APACHE", "LICENSE-MIT"]},
    {main, "readme"},
    {homepage_url, "https://github.com/cubelio/otter"}
]}.