forked from kafkaex/kayrock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
87 lines (78 loc) · 2.19 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
defmodule Kayrock.MixProject do
use Mix.Project
@source_url "https://github.com/kafkaex/kayrock"
def project do
[
app: :kayrock,
version: "0.2.0",
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test, "test.integration": :test],
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
dialyzer: [
plt_add_apps: [:mix],
flags: [:error_handling]
],
description: "Elixir interface to the Kafka protocol",
package: package(),
docs: [
main: "readme",
extras: ["README.md"],
source_url: @source_url,
skip_undefined_reference_warnings_on: [
"README.md",
"lib/kayrock/error_code.ex",
"lib/kayrock/socket.ex"
]
]
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
# Core
{:crc32cer, "~> 0.1"},
{:varint, "~> 1.2"},
{:connection, "~> 1.1"},
# Dev/Test
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev], runtime: false},
{:ex_doc, "~> 0.30", only: [:dev], runtime: false},
{:excoveralls, "~> 0.18", only: :test},
{:kafka_protocol, "~> 2.4.1", only: [:dev, :test]},
{:snappy, git: "https://github.com/fdmanana/snappy-erlang-nif", only: [:dev, :test]},
{:snappyer, "~> 1.2", only: [:dev, :test]}
]
|> integration_test_deps()
end
defp integration_test_deps(deps_list) do
if Version.match?(System.version(), ">= 1.15.0") do
[{:testcontainers, "~> 1.6", only: :test} | deps_list]
else
deps_list
end
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(:dev), do: ["lib", "generated_code"]
defp elixirc_paths(_), do: ["lib"]
defp package do
[
maintainers: ["Dan Swain", "Argonus"],
files: ["lib", "config/config.exs", "mix.exs", "README.md"],
licenses: ["MIT"],
links: %{"GitHub" => @source_url}
]
end
defp aliases do
[
"test.integration": "test --only integration_v2"
]
end
end