-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathmix.exs
More file actions
120 lines (112 loc) · 3.76 KB
/
mix.exs
File metadata and controls
120 lines (112 loc) · 3.76 KB
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
#
# This file is part of Astarte.
#
# Copyright 2017-2025 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
defmodule Astarte.AppEngine.API.Mixfile do
use Mix.Project
def project do
[
app: :astarte_appengine_api,
elixir: "~> 1.15",
version: "1.3.0-rc.1",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
dialyzer: [plt_add_apps: [:astarte_realm_management, :ex_unit]],
deps: deps() ++ astarte_required_modules(System.get_env("ASTARTE_IN_UMBRELLA"))
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Astarte.AppEngine.API.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["test/support", "lib"]
defp elixirc_paths(_), do: ["lib"]
defp astarte_required_modules("true") do
[
{:astarte_core, in_umbrella: true}
]
end
defp astarte_required_modules(_) do
[
{:astarte_core,
github: "astarte-platform/astarte_core", branch: "release-1.3", override: true},
{:astarte_generators, github: "astarte-platform/astarte_generators", only: [:dev, :test]},
{:astarte_realm_management,
path: "../astarte_realm_management", only: :test, runtime: false}
]
end
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:amqp, "~> 3.0"},
{:phoenix, "~> 1.7"},
{:phoenix_ecto, "~> 4.0"},
{:phoenix_view, "~> 2.0"},
{:gettext, "~> 0.24"},
{:plug_cowboy, "~> 2.1"},
{:jason, "~> 1.2"},
{:cors_plug, "~> 2.0"},
{:ex_lttb, "~> 0.3"},
{:cyanide, "~> 2.0"},
{:guardian, "~> 2.4.0"},
{:uuid, "~> 2.0", hex: :uuid_erl},
# Required by :phoenix_swagger, otherwise it fails finding ex_json_schema.app
{:ex_json_schema, "~> 0.7"},
{:current_rabbit_pool, "~> 1.1"},
{:phoenix_swagger, "~> 0.8"},
{:xandra, "~> 0.13"},
{:exandra, "~> 0.13"},
{:typed_ecto_schema, "~> 0.4"},
{:pretty_log, "~> 0.1"},
{:plug_logger_with_meta, "~> 0.1"},
{:telemetry, "~> 1.0"},
{:telemetry_metrics, "~> 1.1"},
{:telemetry_poller, "~> 1.3"},
{:telemetry_metrics_prometheus_core, "~> 1.2"},
{:skogsra, "~> 2.2"},
{:castore, "~> 1.0.0"},
{:observer_cli, "~> 1.5"},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:libcluster, "~> 3.3"},
{:astarte_data_access, path: astarte_lib("astarte_data_access")},
{:astarte_rpc, path: astarte_lib("astarte_rpc")},
{:horde, "~> 0.9"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
# Test section
{:excoveralls, "~> 0.15", only: :test},
{:mox, "~> 0.5", only: :test},
{:mimic, "~> 1.11", only: :test}
]
end
defp astarte_lib(library_name) do
base_directory = System.get_env("ASTARTE_LIBRARIES_PATH", "../../libs")
Path.join(base_directory, library_name)
end
end