-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmix.exs
More file actions
118 lines (107 loc) · 2.92 KB
/
mix.exs
File metadata and controls
118 lines (107 loc) · 2.92 KB
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
115
116
117
118
defmodule UnicodeTransform.MixProject do
use Mix.Project
@version "1.0.0"
def project do
[
app: :unicode_transform,
version: @version,
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
build_embedded: Mix.env() == :prod,
compilers: maybe_elixir_make() ++ Mix.compilers(),
make_makefile: "c_src/Makefile",
deps: deps(),
docs: docs(),
name: "Unicode Transform",
source_url: "https://github.com/elixir-unicode/unicode_transform",
description: description(),
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_add_apps: ~w(mix sweet_xml unicode_set)a,
ignore_warnings: ".dialyzer_ignore_warnings"
]
]
end
@doc false
def nif_enabled? do
String.downcase(System.get_env("CLDR_TRANSFORM_NIF", "false")) == "true" or
Application.get_env(:ex_cldr_transform, :nif, false) == true
end
defp maybe_elixir_make do
if nif_enabled?() do
[:elixir_make]
else
[]
end
end
defp description do
"""
Transliterates text between scripts, applies normalization and case
mappings, and executes arbitrary CLDR transforms.
"""
end
defp package do
[
maintainers: ["Kip Cole"],
licenses: ["Apache-2.0"],
logo: "logo.png",
links: links(),
files: [
"lib",
"c_src",
"priv/transforms",
"logo.png",
"mix.exs",
"README*",
"CHANGELOG*",
"LICENSE*",
"TRANSFORMS.md"
]
]
end
def application do
[
extra_applications: [:logger],
mod: {Unicode.Transform.Application, []}
]
end
defp deps do
[
{:unicode_set, "~> 1.6"},
{:sweet_xml, "~> 0.7", runtime: false},
{:ex_doc, "~> 0.24", only: [:dev, :release], runtime: false, optional: true},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false, optional: true},
{:req, "~> 0.5", only: :dev, runtime: false},
{:benchee, "~> 1.0", only: :dev, runtime: false},
{:elixir_make, "~> 0.9", runtime: false, optional: true},
{:stream_data, "~> 1.0", only: :test}
]
end
def links do
%{
"GitHub" => "https://github.com/elixir-unicode/unicode_transform",
"Readme" =>
"https://github.com/elixir-unicode/unicode_transform/blob/v#{@version}/README.md",
"Changelog" =>
"https://github.com/elixir-unicode/unicode_transform/blob/v#{@version}/CHANGELOG.md"
}
end
def docs do
[
source_ref: "v#{@version}",
main: "readme",
logo: "logo.png",
extras: [
"README.md",
"LICENSE.md",
"CHANGELOG.md"
],
formatters: ["html", "markdown"],
skip_undefined_reference_warnings_on: ["changelog", "CHANGELOG.md"]
]
end
defp elixirc_paths(:test), do: ["lib", "test"]
defp elixirc_paths(:dev), do: ["lib", "bench"]
defp elixirc_paths(_), do: ["lib"]
end