-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmix.exs
82 lines (74 loc) · 1.83 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
defmodule Resvg.MixProject do
use Mix.Project
@source_url "https://github.com/mrdotb/resvg_nif"
@version "0.4.0"
def project do
[
aliases: aliases(),
app: :resvg,
deps: deps(),
docs: docs(),
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
name: "resvg",
package: package(),
start_permanent: Mix.env() == :prod,
version: @version
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:rustler_precompiled, "~> 0.8.1"},
{:rustler, "~> 0.36.0", optional: true},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:approval, "~> 0.1", only: :test}
]
end
defp package do
[
description: "Svg to png. NIF bindings for resvg.",
maintainers: ["Mrdotb"],
licenses: ["MIT"],
files: ~w(
lib native .formatter.exs README.md LICENSE.md CHANGELOG.md mix.exs checksum-*.exs
)s,
links: %{"GitHub" => @source_url}
]
end
def docs do
[
source_ref: "master",
main: "readme",
extras: [
"CHANGELOG.md": [],
"CONTRIBUTING.md": [title: "Contributing"],
"CODE_OF_CONDUCT.md": [title: "Code of Conduct"],
"LICENSE.md": [title: "License"],
"README.md": [title: "Overview"]
],
source_url: @source_url,
source_ref: "v#{@version}",
homepage_url: @source_url,
formatters: ["html"]
]
end
defp aliases do
[
"format.all": [
"format",
"cmd cargo fmt --manifest-path native/resvg/Cargo.toml"
],
"format.check": [
"format --check-formatted",
"cmd cargo fmt --manifest-path native/resvg/Cargo.toml -- --check"
]
]
end
defp elixirc_paths(:test), do: ["lib", "test"]
defp elixirc_paths(_), do: ["lib"]
end