/
mix.exs
103 lines (86 loc) · 2.5 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
defmodule EctoCommons.MixProject do
use Mix.Project
@version "0.3.6"
def project do
[
app: :ecto_commons,
version: @version,
name: "Ecto Commons",
description: description(),
source_url: "https://github.com/achedeuzot/ecto_commons",
homepage_url: "http://hexdocs.pm/ecto_commons",
package: package(),
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
docs: docs(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
# Test coverage:
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
# Type checking
dialyzer: [
plt_core_path: "_build/#{Mix.env()}",
plt_add_deps: :apps_direct,
plt_ignore_apps: [:earmark, :benchee, :ex_doc]
]
]
end
# 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
[
{:ecto, "~> 3.4"},
# Used by email validator
{:burnex, "~> 3.0", optional: true},
# Used by Luhn validator
{:luhn, "~> 0.3.0"},
# Used by phone number validator
{:ex_phone_number, "~> 0.2"},
# Docs:
{:ex_doc, "~> 0.21", only: :dev},
{:earmark, "~> 1.3", only: :dev},
# Testing:
{:excoveralls, "~> 0.11", only: :test},
# Benchmarking
{:benchee, "~> 1.0", only: :dev},
# Type checking
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
# Lint:
{:credo, "~> 1.1", only: [:dev, :test], runtime: false},
{:credo_contrib, "~> 0.2.0", only: [:dev, :test], runtime: false}
]
end
defp docs do
[source_ref: "v#{@version}", main: "readme", extras: docs_extras()]
end
defp docs_extras do
["README.md"]
end
defp description do
"Common helpers for Ecto: validators, formatters, etc."
end
defp package do
[
name: :ecto_commons,
files: ~w(lib priv/data .formatter.exs mix.exs README.md LICENSE CHANGELOG.md),
maintainers: ["Klemen Sever"],
licenses: ["MIT"],
links: %{GitHub: "https://github.com/achedeuzot/ecto_commons"}
]
end
end