-
Notifications
You must be signed in to change notification settings - Fork 5
/
mix.exs
103 lines (88 loc) · 2.31 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 Aja.MixProject do
use Mix.Project
@version "0.7.1"
def project do
[
app: :aja,
version: @version,
elixir: "~> 1.12",
deps: deps(),
consolidate_protocols: Mix.env() != :test,
aliases: aliases(),
preferred_cli_env: [
inch: :docs,
docs: :docs,
"hex.publish": :docs,
dialyzer: :dialyzer,
cover: :test,
"test.unit": :test,
"test.prop": :test
],
# Hex
description:
"Extension of the Elixir standard library focused on data stuctures, data manipulation and performance",
package: package(),
# Docs
name: "Aja",
docs: docs(),
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [flags: [:missing_return]]
]
end
# fixing https://elixirforum.com/t/confusing-behavior-of-optional-deps-in-mix-exs/17719
def application do
case Mix.env() do
:dialyzer ->
[
extra_applications: [:jason]
]
:test ->
[
extra_applications: [:stream_data]
]
_ ->
[]
end
end
defp deps do
[
# OPTIONAL DEPENDENCIES
{:jason, "~> 1.2", optional: true},
# CI
{:dialyxir, "~> 1.0", only: :dialyzer, runtime: false},
{:stream_data, "~> 1.0", only: [:test, :dev], runtime: false},
# DOCS
{:ex_doc, "~> 0.28", only: :docs, runtime: false},
# BENCHMARKING
{:benchee, "~> 1.0", only: :bench, runtime: false}
]
end
defp aliases do
[
docs: ["compile --force", "docs"],
"test.prop": ["test --only property:true"],
"test.unit": ["test --exclude property:true"]
]
end
defp package do
[
maintainers: ["sabiwara"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/sabiwara/aja"},
files: ~w(lib mix.exs README.md LICENSE.md CHANGELOG.md images/logo_small.png)
]
end
defp docs do
[
main: "readme",
logo: "images/logo_small.png",
source_ref: "v#{@version}",
source_url: "https://github.com/sabiwara/aja",
homepage_url: "https://github.com/sabiwara/aja",
extra_section: "Pages",
extras: ["README.md", "CHANGELOG.md", "LICENSE.md"]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end