-
Notifications
You must be signed in to change notification settings - Fork 3
/
mix.exs
113 lines (103 loc) · 2.62 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
104
105
106
107
108
109
110
111
112
113
defmodule WatcherEx.MixProject do
use Mix.Project
@url "https://github.com/lcpojr/watcher_ex"
@maintainers ["Luiz Carlos"]
@licenses ["Apache-2.0"]
@version_file "VERSION.txt"
def project do
[
apps_path: "apps",
version: version(),
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
package: package(),
description: "An OAuth2 provider interelly in elixir.",
source_url: @url,
dialyzer: dialyzer(),
test_coverage: [tool: ExCoveralls],
elixirc_options: [warnings_as_errors: true],
preferred_cli_env: preferred_cli_env(),
aliases: aliases(),
releases: releases()
]
end
defp version do
@version_file
|> File.read!()
|> String.trim()
end
defp deps do
[
# Tools
{:junit_formatter, "~> 3.2", only: [:test]},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:credo, "~> 1.5", only: [:dev, :test], runtime: true},
{:ex_doc, "~> 0.24", only: :dev, runtime: false},
{:excoveralls, "~> 0.14", only: :test},
{:mox, "~> 0.5", only: :test}
]
end
defp package do
[
files: ["lib", "mix.exs", "README.md", "LICENSE.txt", "CHANGELOG.md"],
maintainers: @maintainers,
licenses: @licenses,
links: %{
"GitHub" => "https://github.com/lcpojr/watcher_ex",
"Docs" => "http://hexdocs.pm/watcher_ex"
}
]
end
defp docs do
[
main: "WatcherEx",
extras: ["README.md"],
deps: [
ecto_sql: "https://hexdocs.pm/ecto_sql/Ecto.Adapters.SQL.html"
]
]
end
defp dialyzer do
[
plt_add_apps: [:ex_unit],
plt_core_path: "dialyzer/plts/",
plt_file: {:no_warn, "dialyzer/plts/dialyzer.plt"},
ignore_warnings: "dialyzer/ignore-warnings.exs"
]
end
defp preferred_cli_env do
[
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
test_setup: :test,
test_reset: :test
]
end
defp aliases do
[
setup: ["ecto.create", "ecto.migrate"],
reset: ["ecto.drop", "setup"],
test_setup: ["ecto.create", "ecto.migrate"],
test_reset: ["ecto.drop", "test_setup"],
seed: ["run apps/resource_manager/priv/repo/seeds.exs"],
test: ["test"]
]
end
defp releases do
[
watcher_ex: [
version: version(),
include_executables_for: [:unix],
applications: [
resource_manager: :permanent,
authorizer: :permanent,
authenticator: :permanent,
rest_api: :permanent
]
]
]
end
end