-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
165 lines (154 loc) · 3.9 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
defmodule Geometry.MixProject do
use Mix.Project
@github "https://github.com/hrzndhrn/geometry"
def project do
[
app: :geometry,
name: "Geometry",
version: "0.4.0",
elixir: "~> 1.14",
description: description(),
source_url: @github,
start_permanent: Mix.env() == :prod,
dialyzer: dialyzer(),
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: preferred_cli_env(),
package: package(),
aliases: aliases(),
docs: docs(),
deps: deps()
]
end
def application do
[extra_applications: [:logger]]
end
def description do
"A set of geometry types for WKT/EWT, WKB/EWKB and GeoJson."
end
def elixirc_paths(env) do
case env do
:test -> ["lib", "test/support"]
_ -> ["lib"]
end
end
defp preferred_cli_env do
[
carp: :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
"coveralls.github": :test,
"geometry.gen": :test
]
end
defp aliases do
[
carp: ["test --seed 0 --max-failures 1"]
]
end
defp docs do
[
extras: [
"CHANGELOG.md"
],
source_url: @github,
main: Geometry,
formatters: ["html"],
groups_for_modules: [
"Geometry primitives 2D": [
Geometry.LineString,
Geometry.LineStringM,
Geometry.Polygon,
Geometry.PolygonM,
Geometry.Point,
Geometry.PointM
],
"Geometry primitives 3D": [
Geometry.LineStringZ,
Geometry.LineStringZM,
Geometry.PolygonZ,
Geometry.PolygonZM,
Geometry.PointZ,
Geometry.PointZM
],
"Multipart geometries 2D": [
Geometry.MultiLineString,
Geometry.MultiLineStringM,
Geometry.MultiPoint,
Geometry.MultiPointM,
Geometry.MultiPolygon,
Geometry.MultiPolygonM
],
"Multipart geometries 3D": [
Geometry.MultiLineStringZ,
Geometry.MultiLineStringZM,
Geometry.MultiPointZ,
Geometry.MultiPointZM,
Geometry.MultiPolygonZ,
Geometry.MultiPolygonZM
],
"Geometries collection 2D": [
Geometry.GeometryCollection,
Geometry.GeometryCollectionM
],
"Geometries collection 3D": [
Geometry.GeometryCollectionZ,
Geometry.GeometryCollectionZM
],
GeoJson: [
Geometry.Feature,
Geometry.FeatureCollection
]
]
]
end
defp dialyzer do
[
flags: [:unmatched_returns, :error_handling],
plt_file: {:no_warn, "test/support/plts/dialyzer.plt"},
ignore_warnings: ".dialyzer_ignore.exs",
plt_ignore_apps: [
:benchee,
:benchee_dsl,
:benchee_markdown,
:deep_merge,
:eex,
:geo,
:jason
]
]
end
defp deps do
[
{:nimble_parsec, "~> 0.5 or ~> 1.0"},
# dev and test
{:beam_file, "~>0.4", only: :dev},
{:benchee_dsl, "~> 0.1", only: :dev},
{:benchee_markdown, "~> 0.2", only: :dev},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
{:ex_doc, "~> 0.28", only: :dev, runtime: false},
{:excoveralls, "~> 0.14", only: :test, runtime: false},
{:geo, "~> 3.4", only: :dev},
{:jason, "~> 1.3", only: [:dev, :test]},
{:mix_test_watch, "~> 1.1", only: :dev, runtime: false},
{:prove, "~> 0.1", only: [:dev, :test]},
{:recode, "~> 0.4", only: :dev},
{:xema, "~> 0.15", only: :test}
]
end
defp package do
[
maintainers: ["Marcus Kruse"],
licenses: ["MIT"],
links: %{"GitHub" => @github},
files: [
"lib",
"mix.exs",
"README*",
"LICENSE*"
]
]
end
end