defmodule ElixirJSON_104_SNAPSHOT.Mixfile do use Mix.Project def project do elixirc_defaults = [debug_info: true, ignore_module_conflict: true, docs: true] [ app: :json, version: "2.0.0-SNAPSHOT", elixir: "~> 1.6", deps: deps(Mix.env()), elixirc_options: elixirc_defaults ++ options(Mix.env), dialyzer: [paths: ["_build/shared/lib/mqttex/ebin"]], description: "Native Elixir library for JSON encoding and decoding", package: package(), source_url: "https://github.com/cblage/elixir-json", homepage_url: "https://hex.pm/packages/json", docs: [readme: true] ] end defp options(env) when env in [:dev, :test], do: [exlager_level: :debug, exlager_truncation_size: 8096] defp options(_), do: [] def application, do: [] def deps(:prod), do: [] def deps(env) when env in [:dev, :test, :docs], do: ex_doc() ++ inch_ex() ++ credo() defp credo, do: [{:credo, github: "cblage/credo", branch: "master", only: [:dev, :test], runtime: false}] defp inch_ex, do: [{:inch_ex, github: "cblage/inch_ex", branch: "master", only: [:dev, :test], runtime: false}] defp ex_doc, do: [{:ex_doc, "~> 0.16", only: :dev, runtime: false}] def package do [ maintainers: ["cblage"], licenses: ["BSD 3-Clause"], links: %{"GitHub" => "https://github.com/cblage/elixir-json"} ] end end