-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
39 lines (32 loc) · 1.01 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
defmodule HitDetector.Mixfile do
use Mix.Project
@uart_in_dev? System.get_env("DEV_UART") == "true" || false
def project do
[app: :hit_detector,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
def application do
# Specify extra applications you'll use from Erlang/Elixir
[extra_applications: [:logger],
mod: {HitDetector.Application, []}]
end
defp deps do
[
{:nerves_uart, "~> 0.1.0", only: nerves_uart_only(@uart_in_dev?)},
{:events, in_umbrella: true},
{:dummy_nerves, in_umbrella: true, only: dummy_nerves_only(@uart_in_dev?)},
]
end
defp nerves_uart_only(true), do: [:dev, :prod]
defp nerves_uart_only(false), do: [:prod]
defp dummy_nerves_only(true), do: [:test]
defp dummy_nerves_only(false), do: [:dev, :test]
end