defmodule RitDatabase.MixProject do
use Mix.Project
def project do
[
app: :rit_database,
name: "Rit Database",
description: "Database Manager for Rit",
source_url: "https://gitlab.com/ritproject/database",
version: "0.0.1",
elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:gettext] ++ Mix.compilers(),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"test.coverage": :test,
"test.static": :test
],
releases: [
rit_database: [
include_executables_for: [:unix],
include_erts: false
]
],
package: [
files: ~w(config lib priv .formatter.exs mix.exs),
licenses: ["AGPL-3.0-or-later"],
links: %{
"GitLab" => "https://gitlab.com/ritproject/database"
}
]
]
end
# Type `mix help compile.app` for more information.
def application do
[
mod: {RitDatabase.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Type `mix help deps` for examples and options.
defp deps do
[
{:argon2_elixir, "~> 2.0.5"},
{:credo, "~> 1.1.2", only: [:dev, :test], runtime: false},
{:dataloader, "~> 1.0.6"},
{:ecto_sql, "~> 3.1"},
{:excoveralls, "~> 0.11.1", only: [:dev, :test]},
{:ex_doc, "~> 0.21.1", only: [:dev], runtime: false},
{:gettext, "~> 0.11"},
{:postgrex, ">= 0.0.0"}
]
end
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
"ecto.bootstrap": ["ecto.create", "ecto.migrate"],
"ecto.setup": ["ecto.bootstrap", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
"test.coverage": ["ecto.drop", "ecto.bootstrap", "coveralls"],
"test.static": ["credo list --strict --all"]
]
end
end