This repository has been archived by the owner on May 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
112 lines (101 loc) · 2.72 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
defmodule Tyyppi.MixProject do
use Mix.Project
@app :tyyppi
@version "0.12.3"
def project do
[
app: @app,
version: @version,
elixir: "~> 1.10",
compilers: compilers(Mix.env()),
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
consolidate_protocols: Mix.env() not in [:dev, :test],
xref: [exclude: []],
description: description(),
package: package(),
deps: deps(),
aliases: aliases(),
docs: docs(),
releases: [],
dialyzer: [
plt_file: {:no_warn, ".dialyzer/dialyzer.plt"},
plt_add_deps: :transitive,
plt_add_apps: [:mix],
list_unused_filters: true,
ignore_warnings: ".dialyzer/ignore.exs"
]
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:boundary, "~> 0.4", runtime: false},
{:stream_data, "~> 0.5", only: [:dev, :test, :ci]},
{:formulae, "~> 0.8", only: [:dev, :test]},
{:jason, "~> 1.0", only: [:dev, :test, :ci]},
{:credo, "~> 1.0", only: [:dev, :test, :ci]},
{:dialyxir, "~> 1.0", only: [:dev, :test, :ci], runtime: false},
{:ex_doc, "~> 0.11", only: :dev}
]
end
defp aliases do
[
quality: ["format", "credo --strict", "dialyzer"],
"quality.ci": [
"format --check-formatted",
"credo --strict",
"dialyzer"
]
]
end
defp description do
"""
Library bringing erlang typespecs to runtime.
Allows type validation, types structs with upserts validation and more.
"""
end
defp package do
[
name: @app,
files: ~w|lib .formatter.exs .dialyzer/ignore.exs mix.exs README* LICENSE|,
maintainers: ["Aleksei Matiushkin"],
licenses: ["Kantox LTD"],
links: %{
"GitHub" => "https://github.com/am-kantox/#{@app}",
"Docs" => "https://hexdocs.pm/#{@app}"
}
]
end
defp docs do
[
main: "getting-started",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/#{@app}",
logo: "stuff/#{@app}-48x48.png",
source_url: "https://github.com/am-kantox/#{@app}",
assets: "stuff/images",
extras: ~w[stuff/getting-started.md],
groups_for_modules: [
Internals: [
Tyyppi.Stats,
Tyyppi.T
],
Examples: [
Tyyppi.Example.Nested,
Tyyppi.Example.Struct,
Tyyppi.Example.Value
]
]
]
end
defp elixirc_paths(:dev), do: ["lib", "test/support"]
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp compilers(:prod), do: Mix.compilers()
defp compilers(_), do: [:boundary | Mix.compilers()]
end