-
Notifications
You must be signed in to change notification settings - Fork 10
/
mix.exs
86 lines (75 loc) · 1.97 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
defmodule Cldr.Territories.Mixfile do
use Mix.Project
@version "2.9.0"
def project do
[
app: :ex_cldr_territories,
version: @version,
elixir: "~> 1.12",
name: "Cldr Territories",
source_url: "https://github.com/elixir-cldr/cldr_territories",
description: description(),
package: package(),
docs: docs(),
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
cldr_provider: {Cldr.Territory.Backend, :define_territory_module, []},
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
]
]
end
defp description do
"""
Terrritory formatting functions for the Common Locale Data Repository (CLDR)
package ex_cldr
"""
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:ex_cldr, cldr_dep()},
{:ex_doc, "~> 0.18", only: [:release, :dev]},
{:jason, "~> 1.0", optional: true},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false, optional: true},
]
end
defp cldr_dep() do
if path = System.get_env("CLDR_PATH") do
[path: path]
else
"~> 2.38"
end
end
defp package do
[
maintainers: ["Benjamin Schultzer"],
licenses: ~w(MIT),
links: links(),
files: ~w(lib config mix.exs README* CHANGELOG* LICENSE*)
]
end
def docs do
[
source_ref: "v#{@version}",
main: "readme",
formatters: ["html"],
extras: ["README.md", "CHANGELOG.md"]
]
end
def links do
%{
"GitHub" => "https://github.com/elixir-cldr/cldr_territories",
"Readme" => "https://github.com/elixir-cldr/cldr_territories/blob/v#{@version}/README.md",
"Changelog" => "https://github.com/elixir-cldr/cldr_territories/blob/v#{@version}/CHANGELOG.md"
}
end
defp elixirc_paths(:test), do: ~w(lib mix test)
defp elixirc_paths(:dev), do: ~w(lib mix)
defp elixirc_paths(_), do: ~w(lib)
end