-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmix.exs
98 lines (89 loc) · 2.51 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
defmodule VBT.MixProject do
use Mix.Project
def project do
[
app: :vbt,
version: "0.1.0",
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
preferred_cli_env: preferred_cli_env(),
dialyzer: dialyzer(),
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(),
source_url: "https://github.com/VeryBigThings/elixir_common_private/",
docs: docs()
]
end
def application do
additional_apps = if Mix.env() == :test, do: [:postgrex, :ecto], else: []
[
extra_applications: [:logger | additional_apps],
mod: {VBT.Application, []}
]
end
defp deps do
[
{:absinthe_phoenix, "~> 2.0"},
{:absinthe_relay, "~> 1.5"},
{:bamboo, "~> 2.2"},
{:bamboo_phoenix, "~> 1.0.0"},
{:bcrypt_elixir, "~> 2.3"},
{:credo, "~> 1.5", runtime: false},
{:dialyxir, "~> 1.1", runtime: false},
{:ecto_enum, "~> 1.4"},
{:ecto_sql, "~> 3.7"},
{:ex_aws_s3, "~> 2.3"},
{:ex_crypto, "~> 0.10.0"},
{:ex_doc, "~> 0.25.1", only: :dev, runtime: false},
{:mox, "~> 1.0", only: :test},
{:oban, "~> 2.8"},
{:parent, "~> 0.12.0"},
{:phoenix_html, "~> 2.13"},
{:phoenix_live_view, "~> 0.14", optional: true},
{:phoenix, "~> 1.5.12"},
{:plug_cowboy, "~> 2.5"},
{:provider, github: "VeryBigThings/provider"},
{:sentry, "~> 8.0"},
{:stream_data, "~> 0.5.0", only: [:test, :dev]}
]
end
defp aliases do
[
credo: ~w/compile credo/,
"ecto.reset": ~w/ecto.drop ecto.create/,
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
defp preferred_cli_env do
[
credo: :test,
dialyzer: :test,
"ecto.reset": :test,
"ecto.migrate": :test,
"ecto.rollback": :test,
"ecto.gen.migration": :test
]
end
defp dialyzer() do
[
plt_add_apps: ~w/mix eex ecto credo bamboo ex_unit phoenix_pubsub phoenix_live_view/a
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp docs do
[
main: VBT,
groups_for_modules: [
"GraphQL & Absinthe": ~r/VBT\.((Absinthe)|(Graphql)).*/,
Ecto: ~r/VBT\.((Ecto)|(Repo)).*/,
"Auth & accounts": ~r/VBT\.((Auth)|(Accounts)).*/,
"External services": ~r/VBT\.((Aws)|(Kubernetes)).*/,
Credo: ~r/VBT\.Credo.*/,
"Business errors": ~r/VBT\.[^\.]*Error/
]
]
end
end