defmodule UnionTypespec.MixProject do use Mix.Project def project do [ app: :union_typespec, version: "0.0.4", elixir: "~> 1.12", package: package(), source_url: "https://github.com/felt/union_typespec", description: "A simple, tiny library for defining an Elixir @type whose values are one of a few options", consolidate_protocols: Mix.env() != :test, deps: deps(), aliases: aliases(), test_coverage: [tool: ExCoveralls], elixirc_paths: elixirc_paths(Mix.env()), docs: docs(), preferred_cli_env: [ check: :test, coveralls: :test, "coveralls.detail": :test, "coveralls.html": :test ], dialyzer: [ plt_file: {:no_warn, "priv/plts/dialyzer.plt"}, flags: [:error_handling, :unknown], # Error out when an ignore rule is no longer useful so we can remove it list_unused_filters: true ] ] end def application do [] end defp package() do [ # These are the default files included in the package files: ~w(lib .formatter.exs mix.exs README* LICENSE* CHANGELOG*), licenses: ["MIT"], links: %{"GitHub" => "https://github.com/felt/union_typespec"} ] end defp deps do [ {:credo, "~> 1.7.0", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false}, {:excoveralls, "~> 0.18.0", only: [:dev, :test], runtime: false}, {:ex_doc, "~> 0.27", only: :dev, runtime: false} ] end defp elixirc_paths(:test), do: ~w(lib test/support) defp elixirc_paths(_env), do: ~w(lib) # Aliases are shortcuts or tasks specific to the current project. # For example, to install project dependencies and perform other setup tasks, run: # # $ mix setup # # See the documentation for `Mix` for more info on aliases. defp aliases do [ check: [ "clean", "deps.unlock --check-unused", "compile --warnings-as-errors", "format --check-formatted", "deps.unlock --check-unused", "test --warnings-as-errors", "credo" ] ] end defp docs do [ extras: ~w(CHANGELOG.md README.md), main: "readme" ] end end