-
Notifications
You must be signed in to change notification settings - Fork 2
/
mix.exs
71 lines (64 loc) · 1.69 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
defmodule QRCoder.MixProject do
use Mix.Project
@version "0.1.2"
def project do
[
app: :qr_coder,
version: @version,
description: "A Rust NIF for creating SVG QR codes",
package: package(),
source_url: "https://github.com/pggalaviz/qrcoder",
homepage_url: "https://github.com/pggalaviz/qrcoder",
elixir: "~> 1.6",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
compilers: [:rustler] ++ Mix.compilers(),
rustler_crates: rustler_crates(),
deps: deps(),
docs: docs()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:rustler, "~> 0.21.0"},
# Code Analysis
{:dialyxir, "~> 1.0.0-rc.4", optional: true, only: [:dev], runtime: false},
# Docs
{:ex_doc, "~> 0.21.2", only: :dev, runtime: false}
]
end
defp package do
[
name: :qr_coder,
maintainers: ["Pedro G. Galaviz ([email protected])"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/pggalaviz/qrcoder"},
files: ~w(lib priv native/qr_coder/src native/qr_coder/Cargo* .formatter.exs mix.exs README* LICENSE*)
]
end
defp docs do
[
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/qrcoder",
source_url: "https://github.com/pggalaviz/qrcoder",
extras: [
"README.md"
]
]
end
defp rustler_crates do
[
qr_coder: [
path: "native/qr_coder",
mode: if(Mix.env() == :prod, do: :release, else: :debug)
]
]
end
end