-
Notifications
You must be signed in to change notification settings - Fork 13
/
mix.exs
167 lines (156 loc) · 4.4 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
defmodule Wanda.MixProject do
use Mix.Project
@version "1.4.0"
@source_url "https://github.com/trento-project/wanda"
def project do
[
app: :wanda,
version: @version,
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
name: "Wanda",
docs: docs(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.github": :test
],
dialyzer: [plt_add_apps: [:ex_unit]]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
mod: {Wanda.Application, []}
]
end
defp docs do
[
main: "readme",
logo: "priv/static/images/trento.svg",
extra_section: "GUIDES",
source_url: @source_url,
assets: "guides/assets/",
extras: extras(),
groups_for_extras: groups_for_extras(),
groups_for_modules: groups_for_modules(),
nest_modules_by_prefix: [
Wanda.Catalog,
Wanda.Executions,
Wanda.Messaging,
WandaWeb
]
]
end
defp extras() do
[
"README.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
"guides/specification.md",
"guides/expression_language.md",
"guides/gatherers.md",
"guides/rhai_expressions_cheat_sheet.cheatmd",
"guides/development/hack_on_wanda.md",
"guides/development/demo.md"
]
end
defp groups_for_extras do
[
"Checks development": [
"guides/specification.md",
"guides/expression_language.md",
"guides/gatherers.md"
],
"Hack on Wanda": ["guides/development/hack_on_wanda.md", "guides/development/demo.md"]
]
end
defp groups_for_modules do
[
Executions: [
~r/Wanda.Executions*/
],
Catalog: [
~r/Wanda.Catalog*/
],
Messaging: [
~r/Wanda.Messaging*/
],
Web: [
~r/WandaWeb*/
]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test),
do: [
"lib",
"test/support",
"demo"
]
defp elixirc_paths(:demo),
do: [
"test/support/factory.ex",
"demo",
"lib"
]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:rhai_rustler, "~> 1.1.1"},
{:rustler, ">= 0.0.0", optional: true},
# project has been archived by its github maintainer
{:gen_rmq, "~> 4.0"},
{:jason, "~> 1.3"},
{:yaml_elixir, "~> 2.9"},
{:trento_contracts,
github: "trento-project/contracts",
sparse: "elixir",
ref: "95ed2147fa9d2dafe79139013d5a43d26f92049b"},
{:unplug, "~> 1.1.0"},
# test deps
{:ex_doc, "~> 0.29", only: [:dev, :test], runtime: false},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:mox, "~> 1.0", only: :test},
{:ex_machina, "~> 2.8.0", only: [:demo, :test]},
{:faker, "~> 0.17", only: [:demo, :test]},
{:excoveralls, "~> 0.10", only: :test},
# phoenix deps
{:phoenix, "~> 1.7"},
{:phoenix_view, "~> 2.0"},
{:phoenix_ecto, "~> 4.4"},
{:ecto_sql, "~> 3.6"},
{:postgrex, ">= 0.0.0"},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"},
{:plug_cowboy, "~> 2.5"},
{:open_api_spex, "~> 3.21.0"},
{:cors_plug, "~> 3.0"},
{:joken, "~> 2.6.0"},
# required overrides to upgrade to elixir 1.15.7 and erlang otp 26
# https://stackoverflow.com/questions/76562092/hi-i-had-created-elixir-project-with-phoenix-framework-there-is-yaml-file-when
{:ecto, "~> 3.10", override: true}
]
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
[
setup: ["deps.get", "ecto.setup"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
"coveralls.github": ["ecto.create --quiet", "ecto.migrate --quiet", "coveralls.github"]
]
end
end