-
Notifications
You must be signed in to change notification settings - Fork 219
/
mix.exs
124 lines (115 loc) · 3.48 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
defmodule Poison.Mixfile do
use Mix.Project
version_path = Path.join([__DIR__, "VERSION"])
@external_resource version_path
@version version_path |> File.read!() |> String.trim()
def project do
[
app: :poison,
name: "Poison",
version: @version,
elixir: "~> 1.12",
description: "An incredibly fast, pure Elixir JSON library",
source_url: "https://github.com/devinus/poison",
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() not in [:dev, :test],
elixirc_paths: elixirc_paths(),
deps: deps(),
docs: docs(),
package: package(),
aliases: aliases(),
xref: [exclude: [Decimal]],
dialyzer: [
plt_add_apps: [:decimal],
flags: [
:error_handling,
:extra_return,
:missing_return,
:unmatched_returns,
:underspecs
]
],
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
"coveralls.post": :test,
"coveralls.github": :test
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
# Specify extra applications you'll use from Erlang/Elixir
if Mix.env() == :bench do
[extra_applications: [:eex]]
else
[]
end
end
defp elixirc_paths do
if Mix.env() == :profile do
~w(lib profile)
else
["lib"]
end
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:benchee_html, "~> 1.0", only: :bench, runtime: false},
{:benchee_markdown, "~> 0.3", only: :bench, runtime: false},
{:benchee, "~> 1.3", only: :bench, runtime: false},
{:castore, "~> 1.0", only: :test, runtime: false},
{:credo, "~> 1.7.7-rc", only: [:dev, :test], runtime: false},
{:decimal, "~> 2.1", optional: true},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18", only: :test, runtime: false},
{:exjsx, "~> 4.0", only: [:bench, :profile], runtime: false},
{:jason, "~> 1.5.0-alpha", only: [:dev, :test, :bench, :profile], runtime: false},
{:jiffy, "~> 1.1", only: [:bench, :profile], runtime: false},
{:jsone, "~> 1.8", only: [:bench, :profile], runtime: false},
{:junit_formatter, "~> 3.4", only: :test, runtime: false},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
{:stream_data, "~> 1.1", only: [:dev, :test], runtime: false},
{:thoas, "~> 1.2", only: [:bench, :profile], runtime: false},
{:tiny, "~> 1.0", only: [:bench, :profile], runtime: false}
]
end
defp docs do
[
main: "Poison",
canonical: "https://hexdocs.pm/poison",
extras: [
"README.md",
"CHANGELOG.md": [title: "Changelog"],
LICENSE: [title: "License"]
],
source_ref: "master"
]
end
defp package do
[
files: ~w(lib mix.exs README.md LICENSE VERSION),
maintainers: ["Devin Alexander Torres <[email protected]>"],
licenses: ["0BSD"],
links: %{"GitHub" => "https://github.com/devinus/poison"}
]
end
defp aliases do
[
"deps.get": [
fn _args ->
System.cmd("git", ["submodule", "update", "--init"],
cd: __DIR__,
env: [],
parallelism: true
)
end,
"deps.get"
]
]
end
end