-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
103 lines (93 loc) · 2.26 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
94
95
96
97
98
99
100
101
102
103
defmodule BACNet.MixProject do
use Mix.Project
def project do
[
app: :bacnet,
version: "0.1.0",
elixir: "~> 1.16",
aliases: aliases(),
description: description(),
package: package(),
deps: deps(),
docs: docs(),
compilers: [:cmake] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls, test_task: "espec"],
dialyzer: [
list_unused_filters: true,
plt_file: {:no_warn, plt_file_path()},
],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.show": :test,
espec: :test,
],
]
end
def application do
[
extra_applications: [:logger],
]
end
defp aliases do
[
"coveralls.show": ["coveralls.html", &open("cover/excoveralls.html", &1)],
"docs.show": ["docs", &open("doc/index.html", &1)],
test: "coveralls",
]
end
defp deps do
[
{:dialyxir, "~> 1.4", only: :dev, runtime: false},
{:espec, "~> 1.9", only: :test},
{:elixir_cmake, "~> 0.8.0"},
{:excoveralls, "~> 0.18", only: :test},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:muontrap, "~> 1.5"},
]
end
defp description do
"""
BACNet elixir library
"""
end
defp docs do
[
main: "readme",
extras: ["README.md", "LICENSE"],
]
end
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/redwirelabs/bacnet_ex"},
maintainers: ["Abelino Romo"],
files: [
".tool-versions",
"CMakeLists.txt",
"LICENSE",
"README.md",
"lib",
"mix.exs",
"src",
],
]
end
# Open a file with the default application for its type.
defp open(file, _args) do
open_command =
System.find_executable("xdg-open") # Linux
|| System.find_executable("open") # Mac
|| raise "Could not find executable 'open' or 'xdg-open'"
System.cmd(open_command, [file])
end
# Path to the dialyzer .plt file.
defp plt_file_path do
[Mix.Project.build_path(), "plt", "dialyxir.plt"]
|> Path.join()
|> Path.expand()
end
end