forked from infinityoneframework/infinity_one
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
213 lines (200 loc) · 6.72 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
defmodule InfinityOne.Mixfile do
use Mix.Project
def project do
[
app: :infinity_one,
version: "1.0.0-beta13",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
docs: [
extras: ["README.md"],
main: "InfinityOne",
groups_for_modules: groups_for_modules()
],
dialyzer: [plt_add_apps: [:mix]],
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [long_compilation_threshold: 45],
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
aliases: aliases(),
deps: deps()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[mod: {InfinityOne.Application, []}, extra_applications: extra_applications(Mix.env())]
end
defp extra_applications(:dev), do: [:logger, :runtime_tools, :coherence]
defp extra_applications(:prod), do: extra_applications(:dev) ++ [:ex_syslogger]
defp extra_applications(_), do: extra_applications(:prod) ++ [:faker_elixir_octopus]
# Specifies which paths to compile per environment.
defp elixirc_paths(:test) do
paths =
plugins()
|> Enum.map(&Path.join(["plugins", &1, "test", "support"]))
|> List.flatten()
elixirc_paths(nil) ++ ["test/support" | paths]
end
defp elixirc_paths(_) do
paths =
plugins()
|> Enum.map(&Path.join(["plugins", &1, "lib"]))
|> List.flatten()
paths ++ ["lib"]
end
defp plugins do
"plugins"
|> File.ls!()
|> Enum.filter(&File.dir?(Path.join("plugins", &1)))
end
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.3", override: true},
{:ecto, "~> 2.1.6", override: true},
# {:phoenix, "~> 1.3.0-rc"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.2"},
# {:mariaex, ">= 0.0.0", only: [:dev, :prod], override: true},
{:mariaex, ">= 0.0.0", override: true},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.13"},
# {:phoenix_haml, "~> 0.2"},
{:unbrella, github: "smpallen99/unbrella"},
# {:unbrella, path: "../unbrella"},
{:coherence, github: "smpallen99/coherence", branch: "ucc_save"},
# {:coherence, path: "../coherence3"},
{:faker_elixir_octopus, "~> 1.0", only: [:dev, :test]},
{:arc_ecto, "~> 0.7.0"},
# {:auto_linker, "~> 0.2"},
{:auto_linker, github: "smpallen99/auto_linker"},
# {:auto_linker, path: "../auto_linker"},
{:link_preview, "~> 1.0.0"},
{:cowboy, "~> 1.0"},
{:mogrify, "~> 0.5", override: true},
{:tempfile, "~> 0.1.0"},
# {:calliope, "== 0.4.1", override: true},
{:hackney, "~> 1.9", override: true},
{:httpoison, "~> 0.13", override: true},
{:poison, "3.1.0", override: true},
# TODO: move this to the chat package
{:hedwig, github: "hedwig-im/hedwig", override: true},
# {:hedwig, "~> 1.0"},
{:hedwig_simple_responders, github: "smpallen99/hedwig_simple_responders"},
# {:hedwig_simple_responders, "~> 0.1.2"},
{:dialyxir, "~> 0.4", only: [:dev], runtime: false},
{:excoveralls, "~> 0.5", only: :test},
{:credo, "~> 0.8", only: [:dev, :test], runtime: false},
{:phoenix_slime, "~> 0.9"},
# {:slime, "~> 1.0", override: true},
{:slime, github: "smpallen99/slime", override: true},
# {:slime, "~> 1.0", override: true},
{:inflex, "~> 1.8"},
# {:postgrex, ">= 0.0.0", only: [:test]},
# {:rebel, path: "../rebel"},
{:rebel, github: "smpallen99/rebel"},
{:exactor, "~> 2.2", override: true},
{:sqlite_ecto2, "~> 2.0"},
{:floki, "~> 0.0", override: true},
{:phoenix_markdown, "~> 1.0"},
{:distillery, "~> 1.4"},
{:conform, "~> 2.5"},
# {:ex_syslogger, github: "smpallen99/ex_syslogger", only: [:prod]},
{:ex_syslogger, github: "smpallen99/ex_syslogger"},
{:gen_smtp, "~> 0.12.0"},
{:exprof, "~> 0.2.0"},
# {:scrivener_ecto, path: "../scrivener_ecto"}
{:scrivener_ecto, github: "smpallen99/scrivener_ecto"},
{:ex_doc, "~> 0.18", only: :dev},
{:briefly, "~> 0.3"},
{:one_model, github: "infinityoneframework/one_model"},
# {:infinity_one_pages, path: "../infinity_one_pages"},
] ++ plugin_deps()
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to create, migrate and run the seeds file at once:
#
# $ mix ecto.setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
"ecto.setup": ["ecto.create", "unbrella.migrate", "unbrella.seed"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
commit: ["deps.get --only #{Mix.env()}", "dialyzer", "credo --strict"],
test: ["ecto.create --quiet", "unbrella.migrate", "unbrella.test"]
]
end
defp plugin_deps do
"plugins/*/deps.exs"
|> Path.wildcard()
|> Enum.reduce([], fn fname, acc ->
{deps, _} = Code.eval_file(fname)
acc ++ deps
end)
end
defp groups_for_modules do
[
Authentication: [~r/Coherence.*/],
"Chat Models & Contexts": [
OneChat.Attachment,
OneChat.Channel,
OneChat.Direct,
OneChat.Emoji,
OneChat.Mention,
OneChat.Message,
OneChat.Mute,
OneChat.Notification,
OneChat.NotificationSetting,
OneChat.PinnedMessage,
OneChat.Reaction,
OneChat.StarredMessage,
OneChat.Subscription,
~r/OneChat.Schema.*/,
OneChat.Accounts,
~r/OneChat.Accounts\.*/
],
"Chat Settings": [~r/OneChat.Settings*/],
"Chat Services": [~r/OneChat.*Service/],
Chat: [
OneChat,
OneChat.AppConfig,
OneChat.Application,
OneChat.ChannelMonitor,
OneChat.ChatConstants,
OneChat.ChatDat,
OneChat.Console,
~r/EmojiOne*/,
OneChat.Hooks,
OneChat.MessageAgent,
OneChat.PresenceAgent,
OneChat.Robot,
OneChat.Shared,
OneChat.SlashCommands,
OneChat.TypingAgent,
OneChat.AccountNotification,
~r/OneChat.File.*/,
~r/OneChat.Robot.*/,
~r"OneChatWeb.*"
],
"One Admin": [~r/OneAdmin.*/],
"One Dialer": [~r/OneDialer*/],
"One Settings": [~r/OneSettings*/],
"One Webrtc": [~r/OneWebrtc.*/],
"One UI Flex Tab": [~r/OneUiFlexTab.*/],
"One Presence": [~r/OnePresence.*/]
]
end
end