forked from nbw/qrusty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
81 lines (71 loc) · 1.55 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
defmodule Qrusty.MixProject do
use Mix.Project
@version "0.1.7"
@source_url "https://github.com/jackpocket/qrusty"
def project do
[
app: :qrusty,
version: @version,
github: @source_url,
elixir: "~> 1.12",
aliases: aliases(),
start_permanent: Mix.env() == :prod,
description: "QR Code library that leverages precompiled Rust",
package: package(),
docs: docs(),
deps: deps()
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:rustler_precompiled, "~> 0.5"},
{:rustler, ">= 0.25.0", optional: true},
# docs
{:ex_doc, "~> 0.27", only: :dev, runtime: false},
# benchmarking
{:benchee, "~> 1.0", only: :dev},
{:benchee_html, "~> 1.0", only: :dev},
{:eqrcode, "~> 0.1.10", only: :dev},
{:qr_code, "~> 2.3.1", only: :dev}
]
end
defp docs do
[
main: "Qrusty",
assets: "assets",
source_ref: "v#{@version}",
source_url: @source_url
]
end
defp package do
[
files: [
"lib",
"native",
"checksum-*.exs",
"mix.exs",
"LICENSE"
],
exclude_patterns: [
"native/qrusty/target"
],
licenses: ["MIT"],
maintainers: ["Matt Mills"],
links: %{"GitHub" => @source_url},
source_url: @source_url
]
end
defp aliases do
[
"compile.local": &compile_local/1
]
end
defp compile_local(_) do
Mix.shell().cmd("QRUSTY_BUILD=true mix compile")
end
end