-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
112 lines (102 loc) · 3.33 KB
/
mix.exs
File metadata and controls
112 lines (102 loc) · 3.33 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
# SPDX-FileCopyrightText: 2025 ash_outstanding contributors <https://github.com/diffo-dev/ash_outstanding/graphs.contributors>
#
# SPDX-License-Identifier: MIT
defmodule AshOutstanding.MixProject do
use Mix.Project
@name :ash_outstanding
@version "0.2.4"
@description "Ash Extension for implementing Outstanding Protocol"
@github_url "https://github.com/diffo-dev/ash_outstanding"
def project() do
[
app: @name,
version: @version,
name: @name,
description: @description,
elixir: "~> 1.18",
consolidate_protocols: Mix.env() != :test,
start_permanent: Mix.env() == :prod,
package: package(),
# ex_doc
source_url: @github_url,
homepage_url: "https://diffo.dev/diffo/outstanding",
docs: [main: "readme", extras: ["README.md"]],
elixirc_paths: elixirc_paths(Mix.env()),
# hex.pm stuff
deps: deps(),
docs: &docs/0,
aliases: aliases()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp package do
[
name: @name,
licenses: ["MIT"],
files: ~w(lib .formatter.exs mix.exs README* LICENSE*
CHANGELOG* documentation),
links: %{
"GitHub" => @github_url,
"Author's home page" => "https://www.diffo.dev"
}
]
end
def application() do
[extra_applications: [:logger]]
end
defp deps() do
[
{:outstanding, "~> 0.2.4"},
{:ash, ash_version("~> 3.0 and >= 3.6.2")},
{:igniter, "~> 0.5", only: [:dev, :test]},
{:ex_doc, "~> 0.37", only: [:dev, :test], runtime: false},
{:ex_check, "~> 0.12", only: [:dev, :test]},
{:git_ops, "~> 2.7", only: [:dev], runtime: false},
{:credo, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:sobelow, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.13", only: [:dev, :test]},
{:mix_audit, ">= 0.0.0", only: [:dev, :test], runtime: false}
]
end
def docs() do
[
homepage_url: @github_url,
source_url: @github_url,
source_ref: "v#{@version}",
main: "readme",
logo: "logos/diffo.jpg",
extras: [
"README.md": [title: "Guide"],
"LICENSE.md": [title: "License"],
"documentation/dsls/DSL-AshOutstanding.Resource.md": [
title: "DSL: AshOutstanding.Resource",
search_data: Spark.Docs.search_data_for(AshOutstanding.Resource)
],
"documentation/dsls/DSL-AshOutstanding.TypedStruct.md": [
title: "DSL: AshOutstanding.TypedStruct",
search_data: Spark.Docs.search_data_for(AshOutstanding.TypedStruct)
]
]
]
end
defp ash_version(default_version) do
case System.get_env("ASH_VERSION") do
nil -> default_version
"local" -> [path: "../ash"]
"main" -> [git: "https://github.com/ash-project/ash.git"]
version -> "~> #{version}"
end
end
defp aliases() do
[
docs: ["spark.cheat_sheets", "docs", "spark.replace_doc_links"],
"spark.cheat_sheets": "spark.cheat_sheets --extensions AshOutstanding.Resource,AshOutstanding.TypedStruct",
"spark.formatter": [
"spark.formatter --extensions AshOutstanding.Resource,AshOutstanding.TypedStruct",
"format .formatter.exs"
]
]
end
end