defmodule Uncharted.MixProject do use Mix.Project @github_organization "unchartedelixir" @app :uncharted @source_url "https://github.com/#{@github_organization}/#{@app}" @version Path.join(__DIR__, "VERSION") |> File.read!() |> String.trim() def project do [ app: @app, version: @version, description: description(), package: package(), docs: docs(), elixir: "~> 1.7", elixirc_paths: elixirc_paths(Mix.env()), compilers: Mix.compilers(), dialyzer: [ plt_add_apps: ~w(ex_unit mix)a, plt_add_deps: :transitive, plt_file: {:no_warn, "priv/plts/dialyzer.plt"} # ignore_warnings: "../.dialyzer-ignore.exs" ], preferred_cli_env: [ coveralls: :test, "coveralls.detail": :test, "coveralls.post": :test, "coveralls.html": :test, credo: :test, dialyzer: :test, docs: :docs, "hex.build": :docs, "hex.publish": :docs ], test_coverage: [tool: ExCoveralls], start_permanent: Mix.env() == :prod, aliases: aliases(), deps: deps() ] end # Configuration for the OTP application. # # Type `mix help compile.app` for more information. def application do [ extra_applications: [:logger] ] end # Specifies which paths to compile per environment. defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] # Specifies your project dependencies. # # Type `mix help deps` for examples and options. defp deps do [ {:credo, "~> 1.4", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false}, {:ex_doc, "~> 0.22", only: :docs, runtime: false}, {:excoveralls, "~> 0.11", only: :test} ] end # Aliases are shortcuts or tasks specific to the current project. # For example, to install project dependencies and perform other setup tasks, run: # # $ mix setup # # See the documentation for `Mix` for more info on aliases. defp aliases do [] end defp description do """ A simple Elixir charting library that generates easy-to-customize charts. """ end defp docs do [ extras: ["README.md", "CHANGELOG.md"], main: "readme", source_ref: "v#{@version}", source_url: @source_url, skip_undefined_reference_warnings_on: ["CHANGELOG.md"] ] end defp package do [ files: package_files(), licenses: ["MIT"], links: %{"GitHub" => @source_url} ] end defp package_files do ~w(lib .formatter.exs mix.exs README.md LICENSE CHANGELOG.md VERSION) end end