-
Notifications
You must be signed in to change notification settings - Fork 75
/
mix.exs
133 lines (116 loc) · 3.05 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
defmodule Nebulex.MixProject do
use Mix.Project
@source_url "https://github.com/cabol/nebulex"
@version "2.6.4"
def project do
[
app: :nebulex,
version: @version,
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
aliases: aliases(),
deps: deps(),
# Testing
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
check: :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
# Dialyzer
dialyzer: dialyzer(),
# Hex
description: "In-memory and distributed caching toolkit for Elixir",
package: package(),
# Docs
name: "Nebulex",
docs: docs()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support", "test/dialyzer"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
extra_applications: [:eex],
mod: {Nebulex.Application, []}
]
end
defp deps do
[
{:shards, "~> 1.1", optional: true},
{:decorator, "~> 1.4", optional: true},
{:telemetry, "~> 0.4 or ~> 1.0", optional: true},
# Test & Code Analysis
{:ex2ms, "~> 1.6", only: :test},
{:mock, "~> 0.3", only: :test},
{:excoveralls, "~> 0.18", only: :test},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:stream_data, "~> 1.1", only: [:dev, :test]},
{:doctor, "~> 0.21", only: [:dev, :test]},
# Benchmark Test
{:benchee, "~> 1.3", only: [:dev, :test]},
{:benchee_html, "~> 1.0", only: [:dev, :test]},
# Docs
{:ex_doc, "~> 0.34", only: [:dev, :test], runtime: false}
]
end
defp aliases do
[
check: [
"compile --warnings-as-errors",
"format --check-formatted",
"credo --strict",
"coveralls.html",
"sobelow --exit --skip",
"dialyzer --format short",
"doctor"
]
]
end
defp package do
[
name: :nebulex,
maintainers: ["Carlos Bolanos"],
licenses: ["MIT"],
links: %{
"Changelog" => "#{@source_url}/blob/master/CHANGELOG.md",
"GitHub" => @source_url
}
]
end
defp docs do
[
main: "Nebulex",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/nebulex",
source_url: @source_url,
extras: [
"guides/getting-started.md",
"guides/cache-usage-patterns.md",
"guides/telemetry.md",
"guides/migrating-to-v2.md",
"guides/creating-new-adapter.md"
]
]
end
defp dialyzer do
[
plt_add_apps: [:shards, :mix, :telemetry],
plt_file: {:no_warn, "priv/plts/" <> plt_file_name()},
flags: [
:unmatched_returns,
:error_handling,
:no_opaque,
:unknown,
:no_return
]
]
end
defp plt_file_name do
"dialyzer-#{Mix.env()}-#{System.otp_release()}-#{System.version()}.plt"
end
end