-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix.exs
86 lines (72 loc) · 1.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
defmodule UXID.MixProject do
use Mix.Project
@name "UXID"
@app :uxid
@description "Generates identifiers like: cus_01epey1jmkxvbt and txn_01epey2p06tr1rtv07xa82zgjj. Includes Ecto type."
@version "2.0.0"
@deps [
# Required
# Optional
{:ecto, "~> 3.12", optional: true},
# Development, Documentation, Testing, ...
{:ex_doc, "~> 0.23", only: :dev},
{:benchee, "~> 1.0", only: :dev},
{:benchee_html, "~> 1.0", only: :dev},
{:ecto_ulid, "~> 0.2", only: :dev, optional: true}
]
def application(), do: [extra_applications: [:crypto]]
def project() do
[
aliases: aliases(),
app: @app,
name: @name,
description: @description,
version: @version,
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
package: package(),
deps: @deps,
elixirc_options: [warnings_as_errors: true],
elixirc_paths: elixirc_paths(Mix.env()),
preferred_cli_env: preferred_cli_env(),
test_coverage: [tool: ExCoveralls],
# Exclude optional dependencies
xref: [exclude: Ecto.ParameterizedType],
# Docs
source_url: "https://github.com/riddler/uxid-ex",
docs: docs()
]
end
# ---------------------------------------------------------------------------
# Private
defp aliases() do
[
coverage: ["coveralls.html"]
]
end
defp elixirc_paths(:test), do: ["test/support", "lib"]
defp elixirc_paths(_), do: ["lib"]
defp docs do
[
main: "readme",
source_url: "https://github.com/riddler/uxid-ex",
extras: ["README.md"]
]
end
defp package() do
[
licenses: ["MIT"],
links: %{
"UXID Project" => "https://github.com/riddler/uxid",
"GitHub" => "https://github.com/riddler/uxid-ex"
}
]
end
defp preferred_cli_env() do
[
coverage: :test,
coveralls: :test,
"coveralls.html": :test
]
end
end