-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmix.exs
More file actions
124 lines (115 loc) · 3.26 KB
/
Copy pathmix.exs
File metadata and controls
124 lines (115 loc) · 3.26 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
defmodule Telemetria.MixProject do
use Mix.Project
@app :telemetria
@version "0.25.0"
def project do
[
app: @app,
version: @version,
elixir: "~> 1.17",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() == :prod,
test_coverage: [summary: [threshold: 40]],
xref: [exclude: []],
description: description(),
package: package(),
deps: deps(),
aliases: aliases(),
docs: docs(),
dialyzer: [
plt_file: {:no_warn, ".dialyzer/plts/dialyzer.plt"},
plt_add_apps: [:nimble_options, :mix],
list_unused_filters: true,
ignore_warnings: ".dialyzer/ignore.exs"
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :inets, :ssl],
mod: {Telemetria.Application, []},
start_phases: [{:telemetry_setup, []}],
registered: [Telemetria, Telemetria.Application]
]
end
defp deps do
[
{:telemetry, "~> 1.0", optional: true},
{:telemetry_poller, "~> 1.0", optional: true},
{:opentelemetry_api, "~> 1.4", optional: true},
# helpers
{:estructura, "~> 1.6"},
{:jason, "~> 1.0", optional: true},
{:nimble_options, "~> 1.0"},
# dev / test
{:mox, "~> 1.0", only: [:dev, :test, :ci]},
{:dialyxir, "~> 1.0", only: [:dev, :test, :ci], runtime: false},
{:credo, "~> 1.0", only: [:dev, :ci], runtime: false},
{:ex_doc, "~> 0.37", only: :dev, runtime: false}
]
end
defp aliases do
[
quality: ["format", "credo --strict", "dialyzer"],
"quality.ci": [
"format --check-formatted",
"credo --strict",
"dialyzer"
]
]
end
defp description do
"""
The helper application that simplifies and standardizes telemetry usage.
"""
end
defp package do
[
name: @app,
files: ~w|stuff lib mix.exs README.md LICENSE|,
maintainers: ["Aleksei Matiushkin"],
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/am-kantox/#{@app}",
"Docs" => "https://hexdocs.pm/#{@app}"
}
]
end
defp docs do
[
main: "Telemetria",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/#{@app}",
logo: "stuff/#{@app}-48x48.png",
source_url: "https://github.com/am-kantox/#{@app}",
assets: %{"stuff/img" => "assets"},
extra_section: "GUIDES",
extras:
["README.md" | Path.wildcard("stuff/*.md")] ++
Path.wildcard("stuff/*.cheatmd"),
groups_for_extras: [
Cheatsheets: Path.wildcard("stuff/*.cheatmd")
],
groups_for_modules: [
# Telemetria
# Telemetria.Backend
Telemetry: [
Telemetria.Backend.Telemetry,
Telemetria.Handler,
Telemetria.Handler.Default,
Telemetria.Formatter,
Telemetria.Telemetry
],
OpenTelemetry: [
Telemetria.Backend.OpenTelemetry
]
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(:ci), do: ["lib", "test/support"]
defp elixirc_paths(:dev), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end