forked from Strech/avrora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
112 lines (103 loc) · 2.58 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
defmodule Avrora.MixProject do
use Mix.Project
def project do
[
app: :avrora,
version: "0.11.0",
elixir: "~> 1.6",
description: description(),
package: package(),
docs: docs(),
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
deps: deps(),
aliases: aliases()
]
end
def application do
[
extra_applications: [:logger, :inets, :ssl, :erlavro]
]
end
# Pathes to compile
defp elixirc_paths(:test), do: ["test/support", "lib"]
defp elixirc_paths(_), do: ["lib"]
defp description do
"""
An Elixir library for working with Avro messages conveniently.
It supports local schema files and Confluent® schema registry.
"""
end
defp package do
[
maintainers: ["Sergey Fedorov"],
licenses: ["MIT"],
links: %{
GitHub: "https://github.com/Strech/avrora"
},
files: [
"lib",
"assets",
"mix.exs",
"README.md",
"LICENSE.md"
]
]
end
defp docs do
[
main: "readme",
logo: "assets/logo.png",
source_url: "https://github.com/Strech/avrora",
before_closing_body_tag: fn _format ->
"""
<script type="text/javascript">
var image = document.getElementById("avroraLogo");
image.src = image.getAttribute("src").replace("/assets", "assets");
var badges = document.getElementById("badges");
badges.parentNode.removeChild(badges);
</script>
"""
end,
extras: [
"README.md"
]
]
end
defp deps do
[
{:jason, "~> 1.2"},
{:erlavro, "~> 2.9.0"},
{:mox, "~> 0.5", only: :test},
{:ex_doc, "~> 0.21", only: :dev, runtime: false},
{:dialyxir, "~> 1.0.0", only: :dev, runtime: false},
{:credo, "~> 1.0", only: :dev, runtime: false},
{:excoveralls, "~> 0.11", only: :test}
]
end
defp aliases do
[
docso: ["docs", "cmd open doc/index.html"],
check: ["cmd mix coveralls", "dialyzer", "credo"],
release: [
"check",
fn _ ->
version = Keyword.get(project(), :version)
Mix.shell().cmd("git tag v#{version}")
Mix.shell().cmd("git push --tags")
end,
"hex.publish"
]
]
end
end