forked from vectordotdev/timber-elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
173 lines (159 loc) · 4.29 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
defmodule Timber.Mixfile do
use Mix.Project
@project_description "🌲 Great Elixir Logging Made Easy. Official Timber.io Integration."
@source_url "https://github.com/timberio/timber-elixir"
@homepage_url "https://github.com/timberio/timber-elixir"
@version "3.1.2"
# Project manifest for Mix
#
# See `mix help` entries for the following if you need
# more information about the options used in this section:
#
# - `compile`
# - `compile.elixir`
# - `compile.erlang`
def project do
[
app: :timber,
name: "Timber",
version: @version,
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env()),
description: @project_description,
source_url: @source_url,
homepage_url: @homepage_url,
package: package(),
deps: deps(),
docs: docs(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
preferred_cli_env: preferred_cli_env(),
test_coverage: test_coverage(),
dialyzer: dialyzer()
]
end
# Appication definition for building the `.app` file
#
# See `mix help compile.app` for more information about the
# options used in this section
#
# Note: Because this is a package, the default environment
# is specified in this section. The `config/*` files in this
# repository are only useful for this package's local development
# and are not distributed with the package.
def application do
[
mod: {Timber.Application, []},
env: env(),
extra_applications: [:logger]
]
end
# The environment to be configured by default
defp env() do
[]
end
# Compiler paths switched on the Mix environment
#
# The `lib` directory is always compiled
#
# In the :test environment, `test/support` will also be compiled
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Preferred CLI Environment details
#
# Defines the preferred environment for Mix tasks
defp preferred_cli_env() do
[
coveralls: :test,
"coveralls.details": :test,
"coveralls.circle": :test,
"coveralls.html": :test,
"coveralls.travis": :test
]
end
# Test Coverage configuration
#
# Sets the test converage tool to be Coveralls
defp test_coverage() do
[
tool: ExCoveralls
]
end
# Dialyzer configuration
defp dialyzer() do
[
plt_add_deps: true,
plt_add_apps: [:mix, :ssl, :inets],
ignore_warnings: "dialyzer.ignore-warnings"
]
end
# Package options for the Hex package listing
#
# See `mix help hex.publish` for more information about
# the options used in this section
defp package() do
[
name: :timber,
files: ["lib", "mix.exs", "README*", "LICENSE*"],
maintainers: ["Ben Johnson"],
licenses: ["ISC"],
links: %{
"GitHub" => @source_url
}
]
end
# Documentation options for ExDoc
defp docs() do
[
source_ref: "v#{@version}",
main: "readme",
logo: "doc_assets/logo.png",
extras: [
"README.md": [title: "README"],
"LICENSE.md": [title: "LICENSE"]
],
groups_for_modules: doc_groups_for_modules()
]
end
defp doc_groups_for_modules() do
[
"Logger Backends": [
Timber.LoggerBackends.HTTP
],
"Test Helpers": [
Timber.HTTPClients.Fake,
Timber.LoggerBackends.InMemory
]
]
end
# Dependencies for this application
#
# See `mix help deps` for more information about the options used
# in this section
#
# Please:
#
# - Keep this as the last section in `mix.exs` to make
# it easily discoverable
# - Keep deps categorized by direct dependencies, third-party integrations,
# tooling
# - Keep each category sorted in alphabetical order
# - End all declarations in `,` so that they can easily be re-arranged
# and sorted
defp deps() do
[
{:hackney, "~> 1.9"},
{:jason, "~> 1.1"},
{:msgpax, "~> 2.2"},
#
# Tooling
#
{:credo, "1.0.0", only: [:dev, :test]},
{:dialyxir, "~> 0.5", only: [:dev, :test]},
{:earmark, "~> 1.2", only: [:dev]},
{:ex_doc, "~> 0.19.0", only: [:dev]},
{:excoveralls, "~> 0.5", only: [:dev, :test]},
{:inch_ex, "~> 1.0", only: [:dev]}
]
end
end