-
Notifications
You must be signed in to change notification settings - Fork 4
/
mix.exs
85 lines (75 loc) · 1.85 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
defmodule TelemetryMetricsTelegraf.MixProject do
use Mix.Project
def project do
[
app: :telemetry_metrics_telegraf,
version: "0.4.0",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
aliases: aliases(),
preferred_cli_env: [check: :test],
deps: deps(),
description: description(),
docs: docs(),
package: package(),
dialyzer: dialyzer()
]
end
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["test/support", "lib"]
defp elixirc_paths(_), do: ["lib"]
defp dialyzer do
case System.get_env("DIALYZER_PLT_FILE") do
nil ->
[]
file ->
[plt_file: {:no_warn, file}]
end
end
defp aliases do
[
check: [
"compile --force --warnings-as-errors",
"format --check-formatted",
"test --trace",
"credo --strict"
]
]
end
defp docs do
[
main: "TelemetryMetricsTelegraf",
source_url: "https://github.com/mugimaru73/telemetry_metrics_telegraf",
nest_modules_by_prefix: [
TelemetryMetricsTelegraf.Adapters,
TelemetryMetricsTelegraf.Telegraf
]
]
end
defp package do
[
licenses: ["Apache-2.0"],
links: %{"GitHub" => "https://github.com/mugimaru73/telemetry_metrics_telegraf"}
]
end
defp description do
"""
Telemetry.Metrics telegraf reporter.
"""
end
defp deps do
[
{:telemetry_metrics, "~> 0.4 or ~> 1.0"},
{:ex_doc, "~> 0.21", only: [:dev, :docs], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test, :dialyzer], runtime: false},
{:hammox, "~> 0.2", only: [:test]},
{:credo, "~> 1.4", only: [:dev, :test], runtime: false},
{:toml, "~> 0.6.1", only: [:dev, :test]}
]
end
end