defmodule Tub.MixProject do use Mix.Project @version File.cwd!() |> Path.join("version") |> File.read!() |> String.trim() @elixir_version File.cwd!() |> Path.join(".elixir_version") |> File.read!() |> String.trim() def project do [ app: :tub, version: @version, elixir: @elixir_version, description: description(), package: package(), start_permanent: Mix.env() == :prod, deps: deps(), elixirc_paths: elixirc_paths(Mix.env()), # exdocs # Docs name: "Tub", source_url: "https://github.com/tyrchen/tub", homepage_url: "https://github.com/tyrchen/tub", docs: [ main: "Tub", extras: ["README.md"] ] ] end # Run "mix help compile.app" to learn about applications. def application do [ extra_applications: [:logger] ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp deps do [ {:absinthe, "~> 1.4.0", only: [:dev, :test]}, {:ecto, "~> 2.1", only: [:dev, :test]}, {:credo, "~> 0.8", only: [:dev, :test]}, {:dialyxir, "~> 0.5", only: [:dev], runtime: false}, {:ex_doc, "~> 0.18", only: [:dev, :test]}, {:pre_commit_hook, "~> 1.2", only: [:dev]} ] end defp description do """ Load a single beam file, an app (a set of beams), or an erlang release (a set of apps) to a node. """ end defp package do [ files: ["lib", "mix.exs", "README*", "LICENSE*", "version", ".elixir_version"], licenses: ["MIT"], maintainers: ["tyr.chen@gmail.com"], links: %{ "GitHub" => "https://github.com/tyrchen/tub", "Docs" => "https://hexdocs.pm/tub" } ] end end