-
Notifications
You must be signed in to change notification settings - Fork 170
/
mix.exs
76 lines (67 loc) · 1.57 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
defmodule Jason.Mixfile do
use Mix.Project
@source_url "https://github.com/michalmuskala/jason"
@version "1.5.0-alpha.2"
def project() do
[
app: :jason,
version: @version,
elixir: "~> 1.4",
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() != :test,
deps: deps(),
preferred_cli_env: [docs: :docs],
dialyzer: dialyzer(),
description: description(),
package: package(),
docs: docs()
]
end
def application() do
[
extra_applications: []
]
end
defp deps() do
[
{:decimal, "~> 1.0 or ~> 2.0", optional: true},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:jason_native, ">= 0.0.0", optional: true}
] ++ maybe_stream_data()
end
defp maybe_stream_data() do
if Version.match?(System.version(), "~> 1.12") do
[{:stream_data, "~> 1.0", only: :test}]
else
[]
end
end
defp dialyzer() do
[
plt_add_apps: [:decimal, :jason_native]
]
end
defp description() do
"""
A blazing fast JSON parser and generator in pure Elixir.
"""
end
defp package() do
[
maintainers: ["Michał Muskała"],
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url}
]
end
defp docs() do
[
main: "readme",
name: "Jason",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/jason",
source_url: @source_url,
extras: ["README.md", "CHANGELOG.md", "LICENSE"]
]
end
end