-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
86 lines (75 loc) · 2.1 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
defmodule Supra.MixProject do
use Mix.Project
@scm_url "https://github.com/synchronal/supra"
@version "1.1.0"
def project do
[
aliases: aliases(),
app: :supra,
deps: deps(),
description: "Common functions and macros for Ecto",
dialyzer: dialyzer(),
docs: docs(),
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
homepage_url: @scm_url,
name: "Supra",
package: package(),
start_permanent: Mix.env() == :prod,
version: @version
]
end
def application,
do: [
extra_applications: [:logger]
]
def cli,
do: [
preferred_envs: [
credo: :test,
dialyzer: :test,
"ecto.gen.migration": :test,
"ecto.setup": :test,
"ecto.reset": :test
]
]
# # #
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]
]
end
defp deps,
do: [
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:ecto, "~> 3.0"},
{:ecto_sql, "~> 3.0", optional: true},
{:ecto_temp, "~> 1.2", only: :test, runtime: false},
{:ex_doc, "~> 0.28", only: [:docs, :dev], runtime: false},
{:mix_audit, "~> 2.0", only: :dev, runtime: false},
{:mix_test_watch, "~> 1.2", runtime: false, only: :dev},
{:moar, "~> 1.10", only: :test},
{:postgrex, ">= 0.0.0", only: :test}
]
defp dialyzer,
do: [
plt_add_apps: [:ex_unit, :mix],
plt_add_deps: :app_tree,
plt_core_path: "_build/#{Mix.env()}",
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
]
defp docs,
do: []
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp package,
do: [
files: ~w[lib .formatter.exs mix.exs README* LICENSE* CHANGELOG*],
licenses: ["MIT"],
maintainers: ["synchronal.dev", "Erik Hanson", "Eric Saxby"],
links: %{"GitHub" => @scm_url}
]
end