forked from joshrotenberg/lingua_ex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
67 lines (60 loc) · 1.41 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
defmodule Lingua.MixProject do
use Mix.Project
def project do
[
app: :lingua,
version: "0.1.1",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
description: description(),
test_coverage: [tool: ExCoveralls],
package: package(),
compilers: [:rustler] ++ Mix.compilers(),
rustler_crates: rustler_crates(),
deps: deps()
]
end
defp description do
"An Elixir wrapper around the Rust Lingua language detection library."
end
defp package do
[
maintainers: ["Josh Rotenberg"],
licenses: ["Apache-2.0"],
links: %{"GitHub" => "https://github.com/joshrotenberg/lingua_ex"},
name: :lingua,
files: [
"lib",
"mix.exs",
"README.md",
"LICENSE",
"native/lingua_nif/Cargo.*",
"native/lingua_nif/src"
]
]
end
def application do
[
extra_applications: [:logger]
]
end
defp rustler_crates do
[
lingua_nif: [
mode: rustc_mode(Mix.env())
]
]
end
defp rustc_mode(:prod), do: :release
defp rustc_mode(:bench), do: :release
defp rustc_mode(_), do: :debug
# defp rustc_mode(_), do: :release
defp deps do
[
{:rustler, "~> 0.21.1"},
{:credo, "~> 1.4", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.10", only: :test},
{:ex_doc, "~> 0.21", only: :dev, runtime: false}
]
end
end