forked from breakroom/snap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
122 lines (110 loc) · 2.59 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
defmodule Snap.MixProject do
use Mix.Project
@github_url "https://github.com/breakroom/snap"
@version "0.8.1"
def project do
[
app: :snap,
name: "Snap",
version: @version,
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
dialyzer: dialyzer(),
aliases: aliases(),
preferred_cli_env: ["test.all": :test],
# Hex
description: "A modern Elasticsearch client",
package: package(),
# Docs
source_url: @github_url,
docs: docs(),
# Suppress warnings
xref: [
exclude: [
Finch
]
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(env) when env in ~w(test)a, do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp dialyzer do
[
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_apps: [:finch]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:finch, "~> 0.8", optional: true},
{:castore, "~> 1.0"},
{:jason, "~> 1.0"},
{:telemetry, "~> 1.0 or ~> 0.4"},
{:ex_doc, "~> 0.23", only: :dev, runtime: false},
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
{:credo, "~> 1.5", only: [:dev, :test], runtime: false}
]
end
defp aliases do
[
dev: "run --no-halt dev.exs",
"test.all": ["test --include integration"]
]
end
defp package do
[
maintainers: ["Tom Taylor"],
licenses: ["MIT"],
links: %{
"GitHub" => @github_url
},
files: ~w(mix.exs lib LICENSE.md README.md CHANGELOG.md)
]
end
defp docs do
[
main: "Snap",
source_ref: @version,
groups_for_modules: [
Authentication: [
Snap.Auth,
Snap.Auth.Plain
],
"HTTP Client": [
Snap.HTTPClient,
Snap.HTTPClient.Adapters.Finch
],
"Bulk operations": [
Snap.Bulk.Action.Create,
Snap.Bulk.Action.Index,
Snap.Bulk.Action.Update,
Snap.Bulk.Action.Delete
],
"Multi search API": [
Snap.Multi,
Snap.Multi.Response
],
"Response structs": [
Snap.SearchResponse,
Snap.Hits,
Snap.Hit
],
Exceptions: [
Snap.ResponseError,
Snap.BulkError,
Snap.HTTPClient.Error
]
]
]
end
end