/
mix.exs
83 lines (72 loc) · 1.96 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
defmodule AnyHttp.MixProject do
use Mix.Project
@version "0.6.3"
@github_url "https://github.com/GRoguelon/any_http"
def project do
[
app: :any_http,
version: @version,
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
name: "Any HTTP",
description: "Elixir library to wrap the main HTTP libraries",
source_url: @github_url,
docs: docs(),
dialyzer: dialyzer()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:inets, :logger, :ssl]
]
end
defp docs do
[
formatters: ["html"],
main: "readme",
extras: ["README.md", "CHANGELOG.md"],
groups_for_modules: [
Adapters: [AnyHttp.Adapters.Httpc, AnyHttp.Adapters.Req, AnyHttp.Adapters.Hackney]
]
]
end
defp dialyzer do
[
list_unused_filters: true,
plt_add_apps: [:req, :hackney]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp package do
[
# These are the default files included in the package
files: ~w[lib mix.exs README* LICENSE*],
licenses: ["MIT"],
links: %{"Github" => @github_url}
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# Required for :httpc client
{:tls_certificate_check, "~> 1.21"},
# Req client
{:req, "~> 0.3", optional: true},
# Hackney client
{:hackney, "~> 1.20", optional: true},
## Dev dependencies
{:dialyxir, "~> 1.3", only: :dev, runtime: false},
{:ex_doc, "~> 0.29", only: :dev, runtime: false},
## Test dependencies
{:bypass, "~> 2.1", only: :test},
## Dev & Test dependencies
{:credo, "~> 1.7", only: [:dev, :test], runtime: false}
]
end
end