defmodule Authorizir.MixProject do
use Mix.Project
def project do
[
name: "Authorizir",
description: "Hierarchical Authorization Library",
source_url: "https://github.com/jwilger/authorizir",
homepage_url: "https://github.com/jwilger/authorizir",
app: :authorizir,
version: "2.0.0-alpha.2",
package: [
links: [],
licenses: ["Apache-2.0"]
],
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
preferred_cli_env: [
"ecto.create": :test,
"ecto.drop": :test,
"ecto.dump": :test,
"ecto.gen.migration": :test,
"ecto.load": :test,
"ecto.migrate": :test,
"ecto.migrations": :test,
"ecto.rollback": :test,
"ecto.reset": :test,
quality: :test
],
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
ignore_warnings: ".dialyzer_ignore.exs"
],
docs: [
main: "readme",
extras: ["README.md", "LICENSE"],
before_closing_body_tag: &before_closing_body_tag/1,
before_closing_head_tag: &before_closing_head_tag/1,
markdown_processor: {ExDoc.Markdown.Earmark, footnotes: true}
]
]
end
defp before_closing_head_tag(:html) do
"""
"""
end
defp before_closing_head_tag(_), do: ""
defp before_closing_body_tag(:html) do
"""
"""
end
defp before_closing_body_tag(_), do: ""
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:credo, "~> 1.1", only: [:dev, :test], runtime: false},
{:dagex, "~> 2.0"},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:ecto_sql, "~> 3.6"},
{:ex_doc, "~> 0.21", only: :dev, runtime: false},
{:postgrex, ">= 0.0.0"},
{:sobelow, "~> 0.9", only: [:dev, :test], runtime: false},
{:typed_ecto_schema, "~> 0.3"},
{:uuid, "~> 1.1"}
]
end
defp aliases do
[
"ecto.reset": ["ecto.drop --quiet", "ecto.create --quiet", "ecto.migrate --quiet"],
test: ["ecto.reset", "test"],
quality: [
"format --check-formatted",
"compile --warnings-as-errors",
"test --raise --slowest 1 --warnings-as-errors",
"credo --strict",
"dialyzer"
]
]
end
end