mix.exs

defmodule Tasque.MixProject do
  use Mix.Project

  def project do
    [
      app: :tasque,
      version: "1.0.0",
      elixir: "~> 1.18",
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps(),
      description: description(),
      package: package(),

      # Docs
      name: "Tasque",
      source_url: "https://github.com/FormlessEvoker/tasque",
      homepage_url: "https://github.com/FormlessEvoker/tasque",
      docs: &docs/0
    ]
  end

  def application do
    [
      extra_applications: [:logger]
    ]
  end

  defp aliases do
    [
      setup: [
        "deps.get",
        "git_hooks.install"
      ],
      test: ["test --color"]
    ]
  end

  defp deps do
    [
      {:credo, "~> 1.7", only: [:dev, :test], runtime: false},
      {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
      {:ex_doc, "~> 0.38.4", only: :dev, runtime: false, warn_if_outdated: true},
      {:git_hooks, "~> 0.8.1", only: [:dev], runtime: false},
      {:mix_test_watch, "~> 1.3", only: [:dev, :test], runtime: false}
    ]
  end

  defp docs do
    [
      main: "Tasque",
      logo: "branding/logo.png",
      extras: ["README.md"]
    ]
  end

  defp description do
    "An asynchronous, bounded-concurrency task queue for Elixir."
  end

  defp package do
    [
      licenses: ["MIT"],
      links: %{
        "GitHub" => "https://github.com/FormlessEvoker/tasque",
        "HexDocs" => "https://hexdocs.pm/tasque"
      }
    ]
  end
end