-
Notifications
You must be signed in to change notification settings - Fork 347
/
mix.exs
125 lines (110 loc) · 3.43 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
defmodule Tesla.Mixfile do
use Mix.Project
@source_url "https://github.com/elixir-tesla/tesla"
@version "1.13.2"
def project do
[
app: :tesla,
version: @version,
description: description(),
package: package(),
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
lockfile: lockfile(System.get_env("LOCKFILE")),
test_coverage: [tool: ExCoveralls],
dialyzer: [
plt_core_path: "_build/#{Mix.env()}",
plt_add_apps: [:mix, :inets, :idna, :ssl_verify_fun, :ex_unit],
plt_add_deps: :apps_direct
],
docs: docs(),
preferred_cli_env: [coveralls: :test, "coveralls.html": :test]
]
end
def application do
[extra_applications: [:logger, :ssl, :inets]]
end
defp description do
"HTTP client library, with support for middleware and multiple adapters."
end
defp package do
[
maintainers: ["Tymon Tobolski"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/elixir-tesla/tesla"}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp lockfile(nil), do: "mix.lock"
defp lockfile(lockfile), do: "test/lockfiles/#{lockfile}.lock"
defp deps do
[
{:mime, "~> 1.0 or ~> 2.0"},
# http clients
{:ibrowse, "4.4.2", optional: true},
{:hackney, "~> 1.6", optional: true},
{:gun, ">= 1.0.0", optional: true},
{:finch, "~> 0.13", optional: true},
{:castore, "~> 0.1 or ~> 1.0", optional: true},
{:mint, "~> 1.0", optional: true},
# json parsers
{:jason, ">= 1.0.0", optional: true},
{:poison, ">= 1.0.0", optional: true},
{:exjsx, ">= 3.0.0", optional: true},
# messagepack parsers
{:msgpax, "~> 2.3", optional: true},
# other
{:fuse, "~> 2.4", optional: true},
{:telemetry, "~> 0.4 or ~> 1.0", optional: true},
{:mox, "~> 1.0", optional: true},
# devtools
{:opentelemetry_process_propagator, ">= 0.0.0", only: [:test, :dev]},
{:excoveralls, ">= 0.0.0", only: :test, runtime: false},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:mix_test_watch, ">= 0.0.0", only: :dev},
{:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:inch_ex, ">= 0.0.0", only: :docs},
# httparrot dependencies
{:httparrot, "~> 1.4", only: :test},
{:cowlib, "~> 2.9", only: [:dev, :test], override: true},
{:ranch, "~> 2.1", only: :test, override: true}
]
end
defp docs do
[
main: "readme",
source_url: @source_url,
source_ref: "v#{@version}",
skip_undefined_reference_warnings_on: ["CHANGELOG.md"],
extra_section: "GUIDES",
logo: "guides/elixir-tesla-logo.png",
extras:
[
"README.md",
"LICENSE"
# TODO: add CHANGELOG.md
# "CHANGELOG.md"
] ++ Path.wildcard("guides/**/*.{cheatmd,md}"),
groups_for_extras: [
Explanations: ~r"/explanations/",
Cheatsheets: ~r"/cheatsheets/",
"How-To's": ~r"/howtos/"
],
groups_for_modules: [
Behaviours: [
Tesla.Adapter,
Tesla.Middleware
],
Adapters: [~r/Tesla.Adapter./],
Middlewares: [~r/Tesla.Middleware./],
TestSupport: [~r/Tesla.TestSupport./]
],
nest_modules_by_prefix: [
Tesla.Adapter,
Tesla.Middleware
]
]
end
end