Current section

Files

Jump to
eyeon mix.exs
Raw

mix.exs

defmodule Eyeon.MixProject do
use Mix.Project
version_path = Path.join([__DIR__, "VERSION"])
@external_resource version_path
@version version_path |> File.read!() |> String.trim()
def project do
[
app: :eyeon,
version: @version,
elixir: "~> 1.16",
description: "An Elixir library for Amazon Ion.",
source_url: "https://gitlab.com/phinnaeus/eyeon",
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() != :test,
compilers: compilers(),
deps: deps(),
docs: docs(),
package: package(),
aliases: aliases(),
dialyzer: dialyzer(),
]
end
def cli do
[
preferred_cli_env: [docs: :docs],
]
end
def application do
[
extra_applications: [:logger],
]
end
defp compilers do
Mix.compilers()
end
defp deps do
[
{:benchee, "~> 1.3", only: :dev, runtime: false},
{:benchee_markdown, "~> 0.3", only: :dev, runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:decimal, "~> 2.3"},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.40", only: :dev, runtime: false},
{:freedom_formatter, "~> 2.1", only: :dev, runtime: false},
{:jason, "~> 1.4", only: [:dev, :test], runtime: false},
{:junit_formatter, "~> 3.4", only: [:test], runtime: false},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
{:stream_data, "~> 1.2", only: :test, runtime: false},
# consumers should bring in their own :tzdata if their data relies on non-UTC datetimes
{:tzdata, "~> 1.1", only: :test, runtime: false},
]
end
defp package do
[
files: ~w(lib mix.exs README.md LICENSE VERSION),
maintainers: ["Tyler Davis <me@tylermackdavis.com>"],
licenses: ["MIT"],
links: %{"Gitlab" => "https://gitlab.com/phinnaeus/eyeon"},
]
end
defp docs do
[
name: "eyeon",
canonical: "https://hexdocs.pm/eyeon",
extras: ["README.md", "CHANGELOG.md", "LICENSE", "bench/README.md"],
]
end
defp dialyzer do
[
flags: [
:unmatched_returns,
:error_handling,
:extra_return,
:missing_return,
:underspecs,
],
# Put the project-level PLT in the priv/ directory (instead of the default _build/ location)
plt_local_path: "priv/plts/project.plt",
# plt_file: {:no_warn, "priv/plts/project.plt"}
plt_core_path: "priv/plts/core.plt",
]
end
defp aliases do
[
"deps.check": ["hex.outdated", "hex.audit", "deps.audit"],
lint: [
"format",
"compile --warnings-as-errors --all-warnings --force",
"dialyzer",
"deps.clean --unlock --unused",
"credo",
],
]
end
end