Current section

Files

Jump to
Raw

mix.exs

defmodule Runbox.MixProject do
use Mix.Project
@version "22.2.0"
def project do
[
app: :runbox,
version: @version,
description: description(),
package: package(),
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
dialyzer: [
list_unused_filters: true,
plt_add_apps: [:ex_unit, :mix]
],
docs: [
formatters: ["html"],
extras: ["README.md", "CHANGELOG.md"],
main: "readme",
skip_undefined_reference_warnings_on: ["CHANGELOG.md"],
nest_modules_by_prefix: [Runbox.Scenario.OutputAction],
filter_modules: fn _mod, metadata ->
internal_docs?() or Map.get(metadata, :group) != :internal
end,
groups_for_modules: [
"Runbox internals": fn metadata -> metadata[:group] == :internal end,
Messages: fn metadata -> metadata[:group] == :messages end,
"Output actions": fn metadata -> metadata[:group] == :output_actions end,
"Development and testing": fn metadata -> metadata[:group] == :dev_tools end,
Utilities: fn metadata -> metadata[:group] == :utilities end
],
source_url_pattern:
"https://preview.hex.pm/preview/altworx_runbox/#{@version}/show/%{path}#L%{line}"
]
]
end
def application do
[
extra_applications: [:logger, :eex],
mod: {Runbox.Application, []},
env: [mode: :slave]
]
end
defp aliases do
[
docs: [
"docs --output doc",
fn _ -> Mix.Task.reenable("docs") end,
fn _ -> Process.put(:docs_target, :internal) end,
"docs --output doc/internal"
]
]
end
defp description do
"""
Runbox is a library for running Altworx scenarios.
"""
end
defp package do
[
name: :altworx_runbox,
licenses: [
"BSD-3-Clause"
],
links: %{
"Changelog" => "https://hexdocs.pm/altworx_runbox/changelog.html",
"Altworx Toolbox" => "https://hex.pm/packages/altworx_toolbox"
}
]
end
defp deps do
[
{:gen_stage, "~> 1.2.1"},
{:mock, "~> 0.3.5", only: :test},
{:uuid, "~> 1.1"},
{:joken, "~> 2.3"},
{:timex, "~> 3.7.13"},
{:jason, "~> 1.3"},
{:heap, "~> 3.0"},
# development tools
{:credo, "~> 1.7.11", only: [:dev, :test], runtime: false},
{:credo_naming, "~> 2.1.0", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1.0", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34.2", only: :dev, runtime: false},
{:junit_formatter, "~> 3.1", only: [:test]},
{:mimic, "~> 1.12", only: [:test]}
]
end
defp internal_docs?, do: Process.get(:docs_target) == :internal
end