defmodule HoTTPotato.Mixfile do use Mix.Project ####### # API # ####### def application() do [ extra_applications: extra_applications(Mix.env()), mod: {HoTTPotato.Application, []} ] end def project() do [ app: :hottpotato, compilers: compilers(), description: description(), deps: deps(), elixir: "~> 1.5", elixirc_paths: elixirc_paths(Mix.env()), "hottpotato.templates": hottpotato_templates(), package: package(), start_permanent: Mix.env() == :prod, version: version(), ] end ########### # Private # ########### defp compilers() do Mix.compilers() ++ [:"hottpotato.templates"] end # Run "mix help deps" to learn about dependencies. defp deps() do [ {:dialyxir, "~> 0.5", only: [:dev], runtime: false}, {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, ] end def description() do "An Elixir library for making async HTTP requests." end def elixirc_paths(:test), do: elixirc_paths() ++ ["test/support"] def elixirc_paths(_), do: elixirc_paths() def elixirc_paths(), do: ["lib"] def extra_applications(), do: [:logger] def extra_applications(:dev), do: extra_applications() ++ [:eex, :mix] def extra_applications(_), do: extra_applications() defp hottpotato_templates() do [ {"README.md.eex", [description: description(), licenses: licenses(), version: version()]}, ] end defp licenses() do [ {"Apache 2.0", "https://www.apache.org/licenses/LICENSE-2.0"}, ] end defp package() do [ licenses: :proplists.get_keys(licenses()), links: %{"GitHub" => "https://github.com/amorphid/hottpotato-elixir"}, maintainers: ["Michael Pope"], ] end defp version() do "0.0.0" end end