defmodule Tripwire.MixProject do use Mix.Project @version "0.1.0" @source_url "https://github.com/nrednav/tripwire" def project do [ app: :tripwire, version: @version, elixir: "~> 1.16", start_permanent: Mix.env() == :prod, elixirc_paths: elixirc_paths(Mix.env()), deps: deps(), aliases: aliases(), description: "OTP-native circuit breaker library for Elixir. Wraps GenServer calls with a three-state circuit breaker that fast-fails when a dependency is unhealthy and automatically probes for recovery.", package: package(), docs: [ main: "Tripwire", extras: [ "README.md", "LICENSE", "CHANGELOG.md", "guides/tutorials/getting-started.md", "guides/how-to/protect-a-genserver.md", "guides/explanation/architecture.md" ] ], dialyzer: [ plt_add_apps: [:ex_unit], flags: [:error_handling, :unmatched_returns, :no_return] ] ] end def application do [ extra_applications: [:logger] ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp aliases do [ check: ["format --check-formatted", "credo --strict", "test"] ] end def cli do [ preferred_envs: [check: :test] ] end defp package do [ maintainers: ["Vandern Rodrigues"], licenses: ["MIT"], links: %{ "GitHub" => @source_url, "Changelog" => @source_url <> "/blob/main/CHANGELOG.md" } ] end defp deps do [ {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}, {:ex_doc, "~> 0.34", only: [:dev, :test], runtime: false} ] end end