forked from coinjar/ex_double_entry
-
Notifications
You must be signed in to change notification settings - Fork 2
/
mix.exs
83 lines (75 loc) · 2.28 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
defmodule ExDoubleEntry.MixProject do
use Mix.Project
def project do
[
aliases: aliases(),
app: :ex_double_entry,
deps: deps(),
description: description(),
dialyzer: dialyzer(),
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
name: "ExDoubleEntry",
package: package(),
source_url: "https://github.com/coinjar/ex_double_entry",
start_permanent: Mix.env() == :prod,
version: "0.1.2"
]
end
def application do
[
mod: {ExDoubleEntry.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
defp elixirc_paths(:test_money), do: ["lib", "test/support"]
defp elixirc_paths(:test_ex_money), do: ["lib", "test/support"]
defp elixirc_paths(:test_ex_money_concurrent_db_pool), do: ["lib", "test/support"]
defp elixirc_paths(:test_mysql_money), do: ["lib", "test/support"]
defp elixirc_paths(:test_mysql_ex_money), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:jason, "~> 1.2"},
{:money, "~> 1.9", only: [:test_money, :test_mysql_money]},
{:ex_money, "~> 5.10",
only: [:test_ex_money, :test_ex_money_concurrent_db_pool, :test_mysql_ex_money]},
{:ecto_sql, "~> 3.7"},
{:postgrex, ">= 0.0.0", optional: true},
{:myxql, ">= 0.0.0", optional: true},
{:ex_machina, "~> 2.7",
only: [
:test_money,
:test_mysql_money,
:test_ex_money,
:test_ex_money_concurrent_db_pool,
:test_mysql_ex_money
]},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:dialyxir, ">= 0.0.0", only: [:dev], runtime: false}
]
end
defp description() do
"An Elixir double-entry library inspired by Ruby's DoubleEntry. Brought to you by CoinJar."
end
defp dialyzer do
[
plt_core_path: "_build/dialyzer",
plt_local_path: "_build/dialyzer"
]
end
defp package() do
[
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/coinjar/ex_double_entry"}
]
end
defp aliases do
[
setup: ["deps.get", "ecto.setup"],
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]
]
end
end