forked from appsignal/appsignal-elixir-plug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
68 lines (61 loc) · 1.82 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
defmodule Appsignal.Plug.MixProject do
use Mix.Project
def project do
[
app: :appsignal_plug,
version: "2.0.13",
description:
"AppSignal's Plug instrumentation instruments calls to Plug applications to gain performance insights and error reporting",
package: %{
maintainers: ["Jeff Kreeftmeijer"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/appsignal/appsignal-elixir-plug"}
},
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
flags: ["-Wunmatched_returns", "-Werror_handling", "-Wunderspecs"]
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
system_version = System.version()
otp_version = System.otp_release()
mime_dependency =
if Mix.env() == :test || Mix.env() == :test_no_nif do
case Version.compare(system_version, "1.10.0") do
:lt -> [{:mime, "~> 1.0"}]
_ -> []
end
else
[]
end
telemetry_version =
case otp_version < "21" do
true -> "~> 0.4"
false -> "~> 0.4 or ~> 1.0"
end
plug_version =
case Version.compare(system_version, "1.10.0") do
:lt -> ">= 1.1.0 and < 1.14.0"
_ -> ">= 1.1.0"
end
[
{:plug, plug_version},
{:appsignal, ">= 2.5.1 and < 3.0.0"},
{:credo, "~> 1.2", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.21", only: :dev, runtime: false},
{:telemetry, telemetry_version}
] ++ mime_dependency
end
end