-
Notifications
You must be signed in to change notification settings - Fork 366
Expand file tree
/
Copy pathmix.exs
More file actions
153 lines (137 loc) · 4.46 KB
/
Copy pathmix.exs
File metadata and controls
153 lines (137 loc) · 4.46 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
defmodule Tesla.Mixfile do
use Mix.Project
@source_url "https://github.com/elixir-tesla/tesla"
@version "1.21.0"
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()
]
end
def cli do
[preferred_envs: [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" => @source_url,
"Changelog" => "#{@source_url}/blob/master/CHANGELOG.md"
}
]
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.5.0", optional: true},
# hackney 2.x, 3.x, and 4.0.0 / 4.0.1 are unsupported: they lack exports we rely on
# (`:hackney.body/1,2`, `:hackney.stream_body/1,2`) or have an incomplete streaming API.
{:hackney, "~> 1.21 or ~> 4.0 and >= 4.0.2", 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},
# 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},
{:opentelemetry_semantic_conventions, "~> 1.27", optional: true},
{:opentelemetry_api, "~> 1.5", override: true, only: [:dev, :test]},
# 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},
{:benchee, "~> 1.4", only: :dev, runtime: false},
# 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",
"guides/howtos/migrations/v1-macro-migration.md"
],
extra_section: "GUIDES",
logo: "guides/elixir-tesla-logo.png",
extras:
[
"README.md",
LICENSE: [title: "License"]
# TODO: add CHANGELOG.md
# "CHANGELOG.md": [title: "Changelog"]
] ++ 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
],
OpenAPI: [
Tesla.OpenAPI,
Tesla.OpenAPI.CookieParam,
Tesla.OpenAPI.CookieParams,
Tesla.OpenAPI.HeaderParam,
Tesla.OpenAPI.HeaderParams,
Tesla.OpenAPI.PathParam,
Tesla.OpenAPI.PathParams,
Tesla.OpenAPI.PathTemplate,
Tesla.OpenAPI.QueryParam,
Tesla.OpenAPI.QueryParams,
Tesla.OpenAPI.QueryString,
Tesla.OpenAPI.QueryStringError,
Tesla.OpenAPI.Response
],
Adapters: [~r/Tesla.Adapter./],
Middlewares: [~r/Tesla.Middleware./],
TestSupport: [~r/Tesla.TestSupport./]
],
nest_modules_by_prefix: [
Tesla.Adapter,
Tesla.Middleware
]
]
end
end