forked from beam-community/ex_machina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
57 lines (50 loc) · 1.38 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
defmodule ExMachina.Mixfile do
use Mix.Project
@project_url "https://github.com/thoughtbot/ex_machina"
@version "1.0.2"
def project do
[
app: :ex_machina,
version: @version,
elixir: "~> 1.2",
description: "A factory library by the creators of FactoryGirl",
source_url: @project_url,
homepage_url: @project_url,
elixirc_paths: elixirc_paths(Mix.env),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
package: package,
docs: [main: "readme", extras: ["README.md"]],
deps: deps
]
end
def application do
[
applications: app_list(Mix.env),
mod: {ExMachina, []}
]
end
def app_list(:test), do: app_list ++ [:ecto, :postgrex]
def app_list(_), do: app_list
def app_list, do: [:logger]
defp deps do
[
{:ex_doc, "~> 0.9", only: :dev},
{:earmark, ">= 0.0.0", only: :dev},
{:ecto, "~> 2.0", optional: true},
{:ecto, "~> 2.0", only: [:dev, :test]},
{:postgrex, ">= 0.0.0", only: [:test]},
{:poison, "~> 2.0.0", only: :test}
]
end
defp package do
[
maintainers: ["Josh Steiner", "Paul Smith"],
licenses: ["MIT"],
links: %{"GitHub" => @project_url}
]
end
defp elixirc_paths(:test), do: elixirc_paths ++ ["test/support"]
defp elixirc_paths(_), do: elixirc_paths
defp elixirc_paths, do: ["lib"]
end