-
Notifications
You must be signed in to change notification settings - Fork 20
/
mix.exs
123 lines (113 loc) · 3.24 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
defmodule Ethers.MixProject do
use Mix.Project
@version "0.5.5"
@source_url "https://github.com/ExWeb3/elixir_ethers"
def project do
[
app: :ethers,
version: @version,
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
name: "Ethers",
source_url: @source_url,
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
test_prepare: :test
],
description:
"A comprehensive Web3 library for interacting with smart contracts on Ethereum using Elixir.",
package: package(),
docs: docs(),
aliases: aliases(),
dialyzer: dialyzer()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :ethereumex]
]
end
defp package do
[
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url},
maintainers: ["Alisina Bahadori"],
files: ["lib", "priv", "mix.exs", "README*", "LICENSE*", "CHANGELOG*"]
]
end
defp docs do
source_ref =
if String.ends_with?(@version, "-dev") do
"main"
else
"v#{@version}"
end
[
main: "readme",
extras: [
"README.md": [title: "Introduction"],
"CHANGELOG.md": [title: "Changelog"],
"guides/typed-arguments.md": [title: "Typed Arguments"]
],
source_url: @source_url,
source_ref: source_ref,
nest_modules_by_prefix: [
Ethers.Contracts
],
groups_for_modules: [
"Builtin Contracts": [
~r/^Ethers\.Contracts\.(?:(?!EventFilters$|Errors\.).)*$/
],
"Builtin EventFilters": [
~r/^Ethers\.Contracts\.[A-Za-z0-9.]+\.EventFilters$/
],
Signer: [
~r/^Ethers\.Signer\.[A-Za-z0-9.]+$/,
~r/^Ethers\.Signer$/
],
"Buitin Contract Errors": [
~r/^Ethers\.Contracts\..*$/
]
],
logo: "assets/exdoc_logo.png",
markdown_processor: {ExDoc.Markdown.Earmark, footnotes: true}
]
end
def dialyzer do
[flags: [:error_handling, :extra_return, :underspecs, :unknown, :unmatched_returns]]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false},
{:ethereumex, "~> 0.10.6"},
{:ex_abi, "~> 0.8.0", optional: System.get_env("SKIP_EX_KECCAK") == "true"},
{:ex_doc, "~> 0.32", only: :dev, runtime: false},
{:ex_keccak, "~> 0.7.5"},
{:ex_rlp, "~> 0.6.0"},
{:ex_secp256k1, "~> 0.7.2", optional: true},
{:excoveralls, "~> 0.10", only: :test},
{:idna, "~> 6.1"},
{:jason, "~> 1.4"},
{:plug, ">= 1.0.0", only: :test},
{:req, "~> 0.5"}
]
end
def aliases do
[
test_prepare: ["run test/test_prepare.exs"],
test: ["test_prepare", "test"]
]
end
end