2018-05-03 08:54:37 -07:00
|
|
|
defmodule POAAgent.MixProject do
|
|
|
|
use Mix.Project
|
|
|
|
|
2018-05-08 11:58:27 -07:00
|
|
|
@version "0.1.0"
|
|
|
|
|
2018-05-03 08:54:37 -07:00
|
|
|
def project do
|
|
|
|
[
|
|
|
|
app: :poa_agent,
|
2018-05-08 11:58:27 -07:00
|
|
|
version: @version,
|
2018-05-03 08:54:37 -07:00
|
|
|
elixir: "~> 1.6",
|
|
|
|
start_permanent: Mix.env() == :prod,
|
2018-05-11 11:29:53 -07:00
|
|
|
elixirc_paths: elixirc_paths(Mix.env),
|
2018-05-08 11:58:27 -07:00
|
|
|
deps: deps(),
|
2018-05-10 03:16:29 -07:00
|
|
|
dialyzer: dialyzer(),
|
2018-05-15 05:37:42 -07:00
|
|
|
docs: docs(),
|
|
|
|
test_coverage: [tool: ExCoveralls]
|
2018-05-03 08:54:37 -07:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def application do
|
|
|
|
[
|
2018-05-07 16:13:41 -07:00
|
|
|
extra_applications: [:logger],
|
|
|
|
mod: {POAAgent.Application, []}
|
2018-05-03 08:54:37 -07:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2018-05-11 11:29:53 -07:00
|
|
|
defp elixirc_paths(:test), do: ["lib", "test/ancillary"]
|
|
|
|
defp elixirc_paths(_), do: ["lib"]
|
|
|
|
|
2018-05-03 08:54:37 -07:00
|
|
|
defp deps do
|
|
|
|
[
|
2018-05-10 15:10:43 -07:00
|
|
|
{:ethereumex, "~> 0.3"},
|
2018-06-13 10:51:01 -07:00
|
|
|
{:poison, "~> 3.1"},
|
2018-05-10 15:10:43 -07:00
|
|
|
|
|
|
|
# Tests
|
2018-05-03 08:54:37 -07:00
|
|
|
{:credo, "~> 0.9", only: [:dev, :test], runtime: false},
|
2018-05-08 11:58:27 -07:00
|
|
|
{:dialyxir, "~> 0.5", only: [:dev], runtime: false},
|
2018-05-10 15:10:43 -07:00
|
|
|
{:mock, "~> 0.3", only: [:test], runtime: false},
|
2018-05-15 05:37:42 -07:00
|
|
|
{:excoveralls, "~> 0.8", only: [:test, :dev], runtime: false},
|
2018-05-08 11:58:27 -07:00
|
|
|
|
|
|
|
# Docs
|
2018-05-11 11:29:53 -07:00
|
|
|
{:ex_doc, "~> 0.18", only: :dev, runtime: false},
|
|
|
|
|
|
|
|
# Transfer
|
|
|
|
{:websockex, "~> 0.4"},
|
2018-05-16 07:57:12 -07:00
|
|
|
{:jason, "~> 1.0"},
|
2018-05-21 06:35:39 -07:00
|
|
|
{:backoff, "~> 1.1"},
|
|
|
|
|
|
|
|
# Releases
|
|
|
|
{:distillery, "~> 1.5", runtime: false}
|
2018-05-03 08:54:37 -07:00
|
|
|
]
|
|
|
|
end
|
2018-05-08 11:58:27 -07:00
|
|
|
|
|
|
|
defp docs do
|
|
|
|
[
|
|
|
|
source_ref: "v#{@version}",
|
|
|
|
main: "POAAgent.Application",
|
|
|
|
source_url: "https://github.com/poanetwork/poa-netstats-agent",
|
2018-05-22 00:58:01 -07:00
|
|
|
extras: [
|
|
|
|
"pages/initial_architecture.md"
|
|
|
|
],
|
2018-05-08 11:58:27 -07:00
|
|
|
groups_for_modules: [
|
|
|
|
"Plugins": [
|
|
|
|
POAAgent.Plugins.Collector,
|
|
|
|
POAAgent.Plugins.Transfer,
|
2018-05-10 15:10:43 -07:00
|
|
|
],
|
|
|
|
"Ethereum Plugins": [
|
2018-05-13 15:45:32 -07:00
|
|
|
POAAgent.Plugins.Collectors.Eth.LatestBlock,
|
2018-05-13 16:45:54 -07:00
|
|
|
POAAgent.Plugins.Collectors.Eth.Stats,
|
2018-06-13 10:51:01 -07:00
|
|
|
POAAgent.Plugins.Collectors.Eth.Pending,
|
|
|
|
POAAgent.Plugins.Collectors.Eth.Information
|
2018-05-08 11:58:27 -07:00
|
|
|
]
|
2018-05-10 15:10:43 -07:00
|
|
|
]
|
2018-05-08 11:58:27 -07:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2018-05-10 03:16:29 -07:00
|
|
|
defp dialyzer do
|
|
|
|
[
|
|
|
|
paths: [
|
|
|
|
"_build/#{Mix.env()}/lib/poa_agent/consolidated"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
2018-05-03 08:54:37 -07:00
|
|
|
end
|