-
Notifications
You must be signed in to change notification settings - Fork 103
/
mix.exs
81 lines (72 loc) · 1.93 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
# Since we depend on gen_statem, an OTP 19 construct
# Warn if someone depends on this in <19
otp_release =
String.split("#{:erlang.system_info(:otp_release)}", ".")
|> List.first()
|> String.to_integer()
if otp_release < 19 do
IO.warn("Swarm requires Erlang/OTP 19 or greater", [])
end
defmodule Swarm.Mixfile do
use Mix.Project
def project do
[
app: :swarm,
version: "3.4.0",
elixir: "~> 1.3",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
description:
"A fast, multi-master, distributed global process registry, with automatic distribution of worker processes.",
package: package(),
docs: docs(),
deps: deps(),
aliases: aliases(),
dialyzer: [
plt_add_apps: [:inets],
plt_add_deps: :transitive,
flags: ~w(-Wunmatched_returns -Werror_handling -Wrace_conditions -Wunderspecs)
]
]
end
def application do
[extra_applications: [:logger, :crypto], mod: {Swarm, []}]
end
defp deps do
[
{:ex_doc, "~> 0.13", only: :dev},
{:dialyxir, "~> 0.3", only: :dev},
{:benchee, "~> 0.4", only: :dev},
{:porcelain, "~> 2.0", only: [:dev, :test]},
{:libring, "~> 1.0"},
{:gen_state_machine, "~> 2.0"}
]
end
defp package do
[
files: ["lib", "src", "mix.exs", "README.md", "LICENSE.md"],
maintainers: ["Paul Schoenfelder"],
licenses: ["MIT"],
links: %{Github: "https://github.com/bitwalker/swarm"}
]
end
defp docs do
[
main: "readme",
formatter_opts: [gfm: true],
extras: [
"README.md"
]
]
end
defp aliases() do
if System.get_env("SWARM_TEST_DEBUG") do
[test: "test --no-start --trace"]
else
[test: "test --no-start"]
end
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end