forked from devinus/poison
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
114 lines (104 loc) · 3.18 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
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.11",
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: [
ignore_warnings: ".dialyzer_ignore.exs",
plt_add_apps: [:decimal],
flags: [
:error_handling,
:race_conditions,
:underspecs,
:unmatched_returns
]
],
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
spec = [extra_applications: []]
if Mix.env() != :bench do
spec
else
Keyword.put_new(spec, :applications, [:logger])
end
end
defp elixirc_paths() do
if Mix.env() == :profile do
["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, "~> 1.0", only: :bench, runtime: false},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:decimal, "~> 2.0", optional: true},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.26", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.14", only: :test, runtime: false},
{:exjsx, "~> 4.0", only: [:bench, :profile], runtime: false},
{:jason, "~> 1.2", only: [:dev, :test, :bench, :profile], runtime: false},
{:jiffy, "~> 1.0", only: [:bench, :profile], runtime: false},
{:json, "~> 1.4", only: [:bench, :profile], runtime: false},
{:jsone, "~> 1.7", only: [:bench, :profile], runtime: false},
{:junit_formatter, "~> 3.3", only: :test, runtime: false},
{:stream_data, "~> 0.5", only: [:dev, :test], runtime: false},
{:tiny, "~> 1.0", only: [:bench, :profile], runtime: false}
]
end
defp docs do
[
main: "Poison",
canonical: "https://hexdocs.pm/poison",
extras: ["README.md"]
]
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 _ ->
System.cmd("git", ["submodule", "update", "--init"], cd: __DIR__, parallelism: true)
end,
"deps.get"
]
]
end
end