ex_speed_game/mix.exs

80 lines
2.1 KiB
Elixir
Raw Normal View History

2020-03-08 20:14:51 +00:00
defmodule ExSpeedGame.MixProject do
use Mix.Project
@app :ex_speed_game
2022-10-08 15:04:12 +00:00
@version "0.3.1"
2020-03-08 20:14:51 +00:00
@all_targets [:rpi0]
def project do
[
app: @app,
version: @version,
2021-10-19 16:33:55 +00:00
elixir: "~> 1.12",
archives: [nerves_bootstrap: "~> 1.10"],
2020-03-08 20:14:51 +00:00
start_permanent: Mix.env() == :prod,
build_embedded: true,
aliases: [loadconfig: [&bootstrap/1]],
deps: deps(),
releases: [{@app, release()}],
preferred_cli_target: [run: :host, test: :host],
compilers: [:phoenix] ++ Mix.compilers()
2020-03-08 20:14:51 +00:00
]
end
# Starting nerves_bootstrap adds the required aliases to Mix.Project.config()
# Aliases are only added if MIX_TARGET is set.
def bootstrap(args) do
Application.start(:nerves_bootstrap)
Mix.Task.run("loadconfig", args)
end
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {ExSpeedGame.Application, []},
2021-10-19 16:33:55 +00:00
extra_applications: [:logger, :runtime_tools, :os_mon, :crypto]
2020-03-08 20:14:51 +00:00
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# Dependencies for all targets
2021-10-19 16:33:55 +00:00
{:nerves, "~> 1.7.11", runtime: false},
{:shoehorn, "~> 0.7"},
{:ring_logger, "~> 0.8"},
2020-03-08 20:14:51 +00:00
{:toolshed, "~> 0.2"},
{:circuits_gpio, "~> 0.4"},
{:blinkchain, "~> 1.0"},
2020-03-08 20:14:51 +00:00
# Web UI stuff
{:phoenix, "~> 1.5.1"},
{:phoenix_live_view, "~> 0.12.0"},
{:phoenix_html, "~> 2.11"},
{:phoenix_live_dashboard, "~> 0.2.0"},
{:telemetry_metrics, "~> 0.4.0"},
{:telemetry_poller, "~> 0.4.0"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.0"},
2020-03-08 20:14:51 +00:00
# Dependencies for all targets except :host
2021-10-19 16:33:55 +00:00
{:nerves_runtime, "~> 0.11", targets: @all_targets},
{:nerves_init_gadget, "~> 0.7", targets: @all_targets},
{:nerves_network, "~> 0.5", targets: @all_targets},
2020-03-08 20:14:51 +00:00
# Dependencies for specific targets
2021-10-19 16:33:55 +00:00
{:nerves_system_rpi0, "~> 1.17", runtime: false, targets: :rpi0}
2020-03-08 20:14:51 +00:00
]
end
def release do
[
overwrite: true,
cookie: "#{@app}_cookie",
include_erts: &Nerves.Release.erts/0,
steps: [&Nerves.Release.init/1, :assemble],
strip_beams: Mix.env() == :prod
]
end
end