defmodule BehaviorTree.Mixfile do
  use Mix.Project

  @github_url "https://github.com/jschomay/elixir-behavior-tree"

  def project do
    [
      app: :behavior_tree,
      name: "Behavior Tree",
      description: "A library for building AI's via composable behavior trees.",
      version: "0.3.1",
      source_url: @github_url,
      homepage_url: @github_url,
      files: ~w(mix.exs lib LICENSE README.md CHANGELOG.md),
      elixir: "~> 1.6",
      build_embedded: Mix.env() == :prod,
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      test_coverage: [tool: ExCoveralls],
      dialyzer: [ignore_warnings: "config/dialyzer.ignore-warnings"],
      preferred_cli_env: [
        coveralls: :test,
        "coveralls.detail": :test,
        "coveralls.post": :test,
        "coveralls.html": :test
      ],
      package: [
        maintainers: ["Jeff Schomay"],
        licenses: ["MIT"],
        links: %{
          "GitHub" => @github_url
        }
      ]
    ]
  end

  # Configuration for the OTP application
  #
  # Type "mix help compile.app" for more information
  def application do
    # Specify extra applications you'll use from Erlang/Elixir
    [extra_applications: [:logger]]
  end

  # Dependencies can be Hex packages:
  #
  #   {:my_dep, "~> 0.3.0"}
  #
  # Or git/path repositories:
  #
  #   {:my_dep, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
  #
  # Type "mix help deps" for more examples and options
  defp deps do
    [
      {:ex_doc, "~> 0.29", only: :dev, runtime: false},
      {:ex_zipper, git: "https://github.com/mikowitz/ex_zipper"},
      {:credo, "~> 1.0", only: [:dev, :test], runtime: false},
      {:mix_test_watch, "~> 1.1.0", only: :dev, runtime: false},
      {:excoveralls, "~> 0.16", only: :test},
      {:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false}
    ]
  end
end
