-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
106 lines (95 loc) · 2.6 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
# Diode Server
# Copyright 2021-2024 Diode
# Licensed under the Diode License, Version 1.1
if String.to_integer(System.otp_release()) < 25 do
IO.puts("this package requires OTP 25.")
raise "incorrect OTP"
end
defmodule Diode.Mixfile do
use Mix.Project
@vsn "1.5.17"
@url "https://github.com/diodechain/diode_node"
def project do
[
aliases: aliases(),
app: :diode,
compilers: Mix.compilers(),
deps: deps(),
description: "Diode Network Relay Node",
dialyzer: [plt_add_apps: [:mix]],
docs: docs(),
elixir: "~> 1.15",
elixirc_options: [warnings_as_errors: Mix.target() == :host],
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
releases: [
diode_node: [
applications: [runtime_tools: :permanent, ssl: :permanent],
steps: [:assemble, :tar],
version: @vsn
]
],
source_url: @url,
start_permanent: Mix.env() == :prod,
version: @vsn
]
end
defp elixirc_paths(:test), do: ["lib", "test/helpers"]
defp elixirc_paths(_), do: ["lib"]
def application do
[mod: {Diode, []}, extra_applications: [:logger, :observer, :runtime_tools]]
end
defp aliases do
[
lint: [
"compile",
"format --check-formatted",
"credo --only warning",
"dialyzer"
]
]
end
defp docs do
[
source_ref: "v#{@vsn}",
source_url: @url,
formatters: ["html"],
main: "readme",
extras: [
LICENSE: [title: "License"],
"README.md": [title: "Readme"]
]
]
end
defp package do
[
maintainers: ["Dominic Letz"],
licenses: ["DIODE"],
links: %{github: @url},
files: ~w(lib LICENSE mix.exs README.md)
]
end
defp deps do
[
{:certmagex, "~> 1.0"},
{:debouncer, "~> 0.1"},
{:dets_plus, "~> 2.0"},
{:eblake2, "~> 1.0"},
{:ex_doc, "~> 0.28", only: :dev, runtime: false},
{:exqlite, github: "dominicletz/exqlite"},
{:httpoison, "~> 2.0"},
{:diode_client, github: "diodechain/diode_client_ex"},
{:keccakf1600, github: "diodechain/erlang-keccakf1600"},
{:libsecp256k1, "~> 0.1", hex: :libsecp256k1_diode_fork},
{:oncrash, "~> 0.0"},
{:plug_cowboy, "~> 2.5"},
{:poison, "~> 6.0"},
{:profiler, github: "dominicletz/profiler"},
{:websockex, "~> 0.5", hex: :websockex_wt},
# linting
{:dialyxir, "~> 1.1", only: [:dev], runtime: false},
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
{:while, "~> 0.2", only: [:test], runtime: false}
]
end
end