Repository navigation
Expand file tree
/
Copy pathmix.exs
More file actions
133 lines (124 loc) · 3.98 KB
/
Copy pathmix.exs
File metadata and controls
133 lines (124 loc) · 3.98 KB
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
124
125
126
127
128
129
130
131
132
133
defmodule KafkaEx.Mixfile do
@moduledoc false
use Mix.Project
@source_url "https://github.com/kafkaex/kafka_ex"
@version "1.2.0"
def project do
[
app: :kafka_ex,
version: @version,
elixir: "~> 1.17",
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_add_apps: [:ssl],
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/kafka_ex.plt"},
flags: [:error_handling]
],
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
"test.unit": :test,
"test.integration": :test,
"test.chaos": :test,
"test.kafka4": :test
],
description: description(),
package: package(),
deps: deps(),
aliases: aliases(),
usage_rules: usage_rules(),
docs: [
main: "readme",
extras: [
"README.md",
"AUTH.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
"UPGRADING.md"
],
source_url: @source_url,
source_ref: "v#{@version}"
]
]
end
def application do
[
mod: {KafkaEx, []},
extra_applications: [:logger, :ssl, :crypto, :public_key]
]
end
defp deps do
[
# Kayrock 1.1.0 adds the Kafka 4.4.0 protocol versions KafkaEx implements,
# including the KIP-848 consumer group APIs.
{:kayrock, "~> 1.1"},
{:telemetry, "~> 1.2"},
{:credo, "~> 1.1", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: :dev, runtime: false},
{:excoveralls, "~> 0.18", only: :test, runtime: false},
{:ex_doc, "~> 0.23", only: :dev, runtime: false},
{:mimic, "~> 1.7", only: :test},
{:stream_data, "~> 1.4", only: :test},
{:snappyer, "~> 1.2", optional: true},
{:lz4b, "~> 0.0.13", optional: true},
{:ezstd, "~> 1.0", optional: true},
{:aws_credentials, "~> 1.0", optional: true},
{:aws_signature, "~> 0.4.2", optional: true},
{:jason, "~> 1.0", optional: true},
{:testcontainers, "~> 1.14", only: :test},
{:usage_rules, "~> 1.1", only: [:dev], runtime: false}
]
end
# Inlines dependency usage rules into AGENTS.md under a managed marker block.
# KafkaEx is built on Kayrock for protocol (de)serialization, so its rules are
# the relevant ones for agents working in this repo. Run `mix usage_rules.sync`
# to refresh. CLAUDE.md is a symlink to AGENTS.md.
defp usage_rules do
[
file: "AGENTS.md",
usage_rules: [:kayrock]
]
end
defp description do
"Elixir client for Apache Kafka with automatic API version negotiation, SASL authentication (PLAIN, SCRAM, OAuth, MSK IAM), consumer groups, compression, and telemetry support."
end
defp aliases do
[
"test.unit":
"test --exclude auth --exclude consume --exclude consumer_group --exclude chaos --exclude lifecycle --exclude produce --exclude rack_awareness",
"test.integration":
"test --include auth --include consume --include consumer_group --include lifecycle --include produce --include rack_awareness",
"test.chaos": "test --only chaos",
# Kafka 4.x (KRaft) protocol tests against a Testcontainers broker; needs Docker.
"test.kafka4": "test --only kafka4"
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp package do
[
maintainers: ["Abejide Ayodele", "Dan Swain", "Jack Lund", "Joshua Scott", "Piotr Rybarczyk"],
files: [
"lib",
"config/config.exs",
"mix.exs",
"README.md",
"LICENSE",
"AUTH.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
"UPGRADING.md",
"usage-rules.md"
],
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Documentation" => "https://hexdocs.pm/kafka_ex",
"Changelog" => "#{@source_url}/blob/master/CHANGELOG.md"
}
]
end
end