# Generated by usvc-1.13.1
# Feel free to adjust, it will not be overridden

defmodule Looper.Mixfile do
  use Mix.Project

  def project do
    [
      app: :looper,
      version: "0.1.0",
      elixir: "~> 1.11",
      build_embedded: Mix.env == :prod,
      start_permanent: Mix.env == :prod,
      elixirc_paths: elixirc_paths(Mix.env),
      deps: deps(),
      aliases: aliases()
    ]
  end

  def elixirc_paths(env) when env in [:test, :dev], do: ["lib", "test"]
  def elixirc_paths(_), do: ["lib"]

  def application do
    # Specify extra applications you'll use from Erlang/Elixir
    [
      extra_applications: [:logger, :runtime_tools],
      env: [mix_env: Mix.env()],
      mod: {Looper.Application, []}
    ]
  end

  defp deps do
    [
      {:credo, "~> 1.4", only: [:dev, :test], runtime: false},
      {:mix_test_watch, "~> 1.1", only: :dev, runtime: false},
      {:ecto_sql, "~> 3.10"},
      {:postgrex, "~> 0.17"},
      {:jason, "~> 1.0"},
      {:log_tee, git: "https://github.com/renderedtext/log-tee.git"},
      {:uuid, "~> 1.1"},
      {:watchman, github: "renderedtext/ex-watchman"},
      {:util, github: "renderedtext/elixir-util"},
      {:mock, "~> 0.3.0", only: :test},
      {:amqp_client, "~> 3.9.2"},
      {:tackle, github: "renderedtext/ex-tackle", tag: "v0.2.1"},
      {:junit_formatter, "~> 3.3", only: [:test]}
    ]
  end

  defp aliases() do
    [
      "deps.local": ["local.hex --force", "local.rebar --force"],
      "deps.setup": ["deps.local", "deps.get"],
      "ecto.reset": ["ecto.drop", "ecto.setup"],
      "ecto.setup": ["ecto.create", "ecto.migrate"],
      setup: ["deps.setup", "ecto.setup"]
    ]
  end
end
