-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmix.exs
93 lines (83 loc) · 2.14 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
defmodule RZstd.MixProject do
use Mix.Project
@app :r_zstd
@name "RZstd"
@description "Rust powered NIF bindings to Facebook's Zstd library"
@version "1.1.0-rc.8"
@github "https://github.com/sezaru/#{@app}"
@author "Eduardo Barreto Alexandre"
@license "MIT"
def project do
[
app: @app,
version: @version,
elixir: "~> 1.10",
name: @name,
description: @description,
deps: deps(),
docs: docs(),
package: package(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
compilers: Mix.compilers(),
rustler_crates: rustler_crates(),
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: preferred_cli_env(),
dialyzer: dialyzer()
]
end
def application, do: [extra_applications: [:logger]]
defp deps do
[
{:benchee, "~> 1.0", only: :dev},
{:unsafe, "~> 1.0", runtime: false},
{:rustler, "~> 0.22.0-rc.1"},
{:ex_doc, "~> 0.24.2", only: [:dev, :docs], runtime: false},
{:excoveralls, "~> 0.13", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:credo, "~> 1.4", only: [:dev, :test], runtime: false}
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
source_url: @github,
extras: [
"README.md"
]
]
end
defp package do
[
name: @app,
maintainers: [@author],
licenses: [@license],
files: ~w(mix.exs lib README.md native/Cargo.* native/src priv/README.md),
links: %{"Github" => @github}
]
end
defp rustler_crates do
[
r_zstd_nif: [
path: "native",
cargo: :system,
default_features: false,
features: [],
mode: :release
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp preferred_cli_env do
[
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
end
defp dialyzer, do: [plt_add_apps: [:mix, :eex]]
end