forked from basho/riak-erlang-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
63 lines (53 loc) · 1.34 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
defmodule Riakc.Mixfile do
use Mix.Project
@version File.read!("VERSION") |> String.strip
def project do
[app: :riakc,
version: @version,
description: "The Riak client for Erlang",
package: package(),
deps: deps(),
erlc_options: erlc_options()]
end
defp erlc_options do
otp_rel = :erlang.list_to_integer(:erlang.system_info(:otp_release))
o1 = try do
case otp_rel do
v when v >= 17 -> [{:d, :namespaced_types}]
_ -> []
end
catch
_ -> []
end
o2 = try do
case otp_rel do
v when v >= 18 -> [{:d, :deprecated_now}]
_ -> []
end
catch
_ -> []
end
o3 = try do
case otp_rel do
v when v >= 19 -> [{:d, :deprecated_19}]
_ -> []
end
catch
_ -> []
end
extra_options = o1 ++ o2 ++ o3
[:debug_info, :warnings_as_errors | extra_options]
end
defp deps do
[
{:riak_pb, "~> 2.3"},
{:ex_doc, ">= 0.0.0", only: :dev}
]
end
defp package do
[files: ~w(include src mix.exs LICENSE Makefile README.md RELNOTES.md rebar.config rebar.config.script tools.mk tools test priv VERSION),
maintainers: ["Drew Kerrigan", "Luke Bakken", "Alex Moore"],
licenses: ["Apache 2.0"],
links: %{"GitHub" => "https://github.com/basho/riak-erlang-client"}]
end
end