defmodule Exldap.Mixfile do
  use Mix.Project

  @version "0.6.3"
  @url "https://github.com/jmerriweather/exldap"
  @maintainers ["Jonathan Merriweather"]

  def project do
    [name: "Exldap",
     app: :exldap,
     version: @version,
     elixir: "~> 1.2",
     build_embedded: Mix.env == :prod,
     start_permanent: Mix.env == :prod,
     maintainers: @maintainers,
     description: "A module for working with LDAP from Elixir",
     source_url: @url,
     homepage_url: @url,
     package: package(),
     deps: deps(),
     docs: docs()
    ]
  end

  def package do
    [
      maintainers: @maintainers,
      licenses: ["MIT"],
      links: %{"GitHub" => @url},
      files: ~w(lib) ++ ~w(LICENSE.md mix.exs README.md)
    ]
  end

  def docs do
    [
      extras: ["README.md", "LICENSE.md"],
      source_ref: "v#{@version}",
      main: "readme"
    ]
  end

  # Configuration for the OTP application
  #
  # Type "mix help compile.app" for more information
  def application do
    [applications: [:logger, :crypto, :public_key, :ssl, :eldap]]
  end

  # Dependencies can be Hex packages:
  #
  #   {:mydep, "~> 0.3.0"}
  #
  # Or git/path repositories:
  #
  #   {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"}
  #
  # Type "mix help deps" for more examples and options
  defp deps do
    [
      {:earmark, ">= 1.0.3", only: :dev},
      {:ex_doc, "~> 0.14", only: :dev}
    ]
  end
end
