-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
111 lines (99 loc) · 2.57 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
defmodule Specter.MixProject do
use Mix.Project
@scm_url "https://github.com/synchronal/specter"
@version "0.4.3"
def project do
[
app: :specter,
deps: deps(),
description: description(),
dialyzer: dialyzer(),
docs: docs(),
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
homepage_url: @scm_url,
package: package(),
preferred_cli_env: [credo: :test, dialyzer: :test, docs: :dev],
source_url: @scm_url,
start_permanent: Mix.env() == :prod,
version: @version
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.28", only: [:dev], runtime: false},
{:jason, "~> 1.3"},
{:markdown_formatter, "~> 1.0", only: :dev, runtime: false},
{:mix_audit, "~> 2.0", only: [:dev], runtime: false},
{:moar, "~> 1.7", only: [:test]},
{:rustler, "~> 0.31"},
{:uuid, "~> 1.1", only: [:test]}
]
end
defp description,
do: """
A rustler nif wrapping webrtc.rs.
"""
defp dialyzer do
[
plt_add_apps: [:ex_unit, :mix],
plt_add_deps: :app_tree,
plt_core_path: "_build/#{Mix.env()}",
plt_file: {:no_warn, "priv/plts/#{otp_version()}/dialyzer.plt"}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp otp_version do
Path.join([:code.root_dir(), "releases", :erlang.system_info(:otp_release), "OTP_VERSION"])
|> File.read!()
|> String.trim()
end
defp docs() do
[
main: "readme",
extras: doc_extras(),
groups_for_extras: groups_for_extras(),
source_ref: "v#{@version}",
assets: "guides/assets"
]
end
defp doc_extras() do
[
"README.md",
"guides/lifecycle.md",
"guides/internal_docs/README.md": [filename: "internal_readme", title: "README"],
"guides/internal_docs/architecture.md": []
]
end
defp groups_for_extras() do
[
{"Guides", Path.wildcard("guides/*.md")},
{"Internal docs", Path.wildcard("guides/internal_docs/*.md")}
]
end
defp package do
[
licenses: ["MIT"],
maintainers: ["Eric Saxby"],
links: %{"GitHub" => @scm_url},
files: ~w(
LICENSE.md
README.md
config
lib
mix.exs
native/specter_nif/src
native/specter_nif/Cargo.toml
native/specter_nif/Cargo.lock
)
]
end
end