wafer/mix.exs

67 lines
1.7 KiB
Elixir
Raw Normal View History

2019-12-29 17:12:36 +13:00
defmodule Wafer.MixProject do
2019-12-20 10:24:51 +13:00
use Mix.Project
@moduledoc false
2019-12-20 10:24:51 +13:00
2019-12-31 18:54:46 +13:00
@description """
Wafer is an Elixir library to make writing drivers for i2c and SPI connected
peripherals and interacting with GPIO pins easier.
"""
@version "0.1.0"
2019-12-20 10:24:51 +13:00
def project do
[
2019-12-29 17:12:36 +13:00
app: :wafer,
2019-12-31 18:54:46 +13:00
version: @version,
2019-12-20 10:24:51 +13:00
elixir: "~> 1.9",
2019-12-29 17:12:36 +13:00
elixirc_paths: elixirc_paths(Mix.env()),
2019-12-20 10:24:51 +13:00
start_permanent: Mix.env() == :prod,
2019-12-31 18:54:46 +13:00
package: package(),
description: @description,
deps: deps(),
consolidate_protocols: Mix.env() != :test
2019-12-20 10:24:51 +13:00
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
2019-12-29 17:12:36 +13:00
mod: {Wafer.Application, []}
2019-12-20 10:24:51 +13:00
]
end
2019-12-31 18:54:46 +13:00
def package do
[
maintainers: ["James Harton <james@automat.nz>"],
licenses: ["MIT"],
links: %{
"Source" => "https://gitlab.com/jimsy/wafer"
}
]
end
2019-12-20 10:24:51 +13:00
# Run "mix help deps" to learn about dependencies.
defp deps do
[
2019-12-31 18:54:46 +13:00
{:ex_doc, ">= 0.0.0", only: :dev},
{:earmark, ">= 0.0.0", only: :dev},
2019-12-29 17:12:36 +13:00
{:mimic, "~> 1.1", only: :test},
{:credo, "~> 1.1", only: [:dev, :test], runtime: false},
{:elixir_ale, "~> 1.2", optional: true},
{:circuits_i2c, "~> 0.3", optional: true},
{:circuits_gpio, "~> 0.4", optional: true},
{:circuits_spi, "~> 0.1", optional: true}
2019-12-20 10:24:51 +13:00
]
end
2019-12-29 17:12:36 +13:00
# Load fake versions of the Circuits and ElixirALE modules unless explicitly
# told not to.
defp elixirc_paths(:test) do
if System.get_env("FAKE_DRIVERS") == "false",
do: elixirc_paths(nil),
else: ["test/support" | elixirc_paths(nil)]
end
2019-12-29 17:12:36 +13:00
defp elixirc_paths(_), do: ["lib"]
2019-12-20 10:24:51 +13:00
end