-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
171 lines (150 loc) · 4.16 KB
/
mix.exs
File metadata and controls
171 lines (150 loc) · 4.16 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
defmodule AshOaskit.MixProject do
use Mix.Project
@version "0.1.1"
@source_url "https://github.com/futhr/ash_oaskit"
def project do
[
app: :ash_oaskit,
version: @version,
elixir: "~> 1.16",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
# Suppress consolidate_protocols warnings in dev environment
consolidate_protocols: Mix.env() != :dev,
# Hex package
description: description(),
package: package(),
# Documentation
name: "AshOasKit",
source_url: @source_url,
homepage_url: @source_url,
docs: docs(),
test_coverage: [tool: ExCoveralls],
dialyzer: [
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/ash_oaskit.plt"},
flags: [:error_handling, :unknown],
plt_add_apps: [:mix, :ex_unit],
ignore_warnings: ".dialyzer_ignore.exs"
]
]
end
def application do
[
extra_applications: [:logger]
]
end
def cli do
[
preferred_envs: [
check: :dev,
coveralls: :test,
"coveralls.html": :test,
"coveralls.json": :test,
"test.watch": :test
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
# Core Ash dependencies
{:ash, "~> 3.0"},
{:spark, "~> 2.0"},
# OpenAPI spec normalization, validation, and rendering
{:oaskit, "~> 0.11"},
# AshJsonApi integration (optional)
{:ash_json_api, "~> 1.0", optional: true},
# Igniter for installation task (optional)
{:igniter, "~> 0.5", optional: true},
# Phoenix integration (optional for consumers, available in test)
{:plug, "~> 1.14"},
{:phoenix, "~> 1.7", optional: true},
# JSON encoding
{:jason, "~> 1.4"},
# Dev/Test dependencies
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:doctest_formatter, "~> 0.4", only: [:dev, :test], runtime: false},
{:ex_check, "~> 0.16", only: :dev, runtime: false},
{:doctor, "~> 0.21", only: :dev, runtime: false},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18", only: :test},
{:mix_test_watch, "~> 1.2", only: [:dev, :test], runtime: false},
{:git_ops, "~> 2.6", only: :dev}
]
end
defp aliases do
[
# Setup
setup: ["deps.get", "deps.compile", "compile"],
# Testing
"test.watch": ["test.watch --stale"],
# Release
release: ["git_ops.release"]
]
end
defp description do
"""
OpenAPI 3.0 and 3.1 spec generator for Ash Framework resources.
Supports dual-version output for migration scenarios.
"""
end
defp package do
[
files: ~w(
lib
.formatter.exs
mix.exs
README.md
LICENSE.md
CHANGELOG.md
CONTRIBUTING.md
usage-rules.md
),
maintainers: ["Tobias Bohwalli <hi@futhr.io>"],
licenses: ["MIT"],
source_url: @source_url,
links: %{
"GitHub" => @source_url,
"Changelog" => "#{@source_url}/blob/main/CHANGELOG.md",
"Issues" => "#{@source_url}/issues"
}
]
end
defp docs do
[
main: "readme",
extras: [
"README.md": [title: "Overview"],
"CHANGELOG.md": [title: "Changelog"],
"CONTRIBUTING.md": [title: "Contributing"],
"LICENSE.md": [title: "License"],
"usage-rules.md": [title: "Usage Rules (LLM)"]
],
groups_for_modules: [
"Core API": [
AshOaskit
],
Generators: [
AshOaskit.Generators.V30,
AshOaskit.Generators.V31
],
Utilities: [
AshOaskit.TypeMapper
],
Phoenix: [
AshOaskit.Controller
]
],
source_ref: "v#{@version}",
source_url: @source_url,
formatters: ["html"]
]
end
end