ash_archival/mix.exs

109 lines
2.8 KiB
Elixir
Raw Normal View History

2022-07-14 06:29:49 +12:00
defmodule AshArchival.MixProject do
use Mix.Project
2023-01-18 11:19:07 +13:00
@version "0.1.3"
2022-07-14 07:19:07 +12:00
@description """
A small resource extension that sets a resource up to archive instead of destroy.
"""
2022-07-14 06:29:49 +12:00
def project do
[
app: :ash_archival,
version: @version,
elixir: "~> 1.13",
source_url: "https://github.com/ash-project/ash_archival",
homepage_url: "https://github.com/ash-project/ash_archival",
start_permanent: Mix.env() == :prod,
description: @description,
2022-07-14 06:29:49 +12:00
aliases: aliases(),
package: package(),
deps: deps(),
docs: docs(),
consolidate_protocols: Mix.env() != :test
]
end
defp package do
[
2022-08-24 13:42:55 +12:00
name: :ash_archival,
2022-07-14 06:29:49 +12:00
licenses: ["MIT"],
files: ~w(lib .formatter.exs mix.exs README* LICENSE*
CHANGELOG* documentation),
2022-07-14 06:29:49 +12:00
links: %{
GitHub: "https://github.com/ash-project/ash_archival"
}
]
end
defp docs do
[
2022-08-24 12:44:26 +12:00
main: "archival",
source_ref: "v#{@version}",
2023-02-01 18:16:54 +13:00
extras: Path.wildcard("documentation/**/*.md"),
spark: [
extensions: [
%{
module: AshArchival.Resource,
name: "Resource Archival",
default_for_target?: false,
target: "Ash.Resource",
type: "Resource"
}
]
2023-01-18 11:16:52 +13:00
],
2022-08-24 12:44:26 +12:00
groups_for_modules: [
Extension: [
AshArchival.Resource
],
Introspection: [
AshArchival.Resource.Info
],
Transformers: [
~r/AshArchival.Resource.Transformers.*/
]
]
2022-07-14 06:29:49 +12:00
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ash, ash_version("~> 2.0")},
2023-02-01 18:16:54 +13:00
{:git_ops, "~> 2.4.5", only: [:dev, :test]},
{:ex_doc, "~> 0.22", only: [:dev, :test], runtime: false},
{:ex_check, "~> 0.14", only: [:dev, :test]},
{: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},
2022-07-14 06:29:49 +12:00
{:excoveralls, "~> 0.14", only: [:dev, :test]},
{:elixir_sense, github: "elixir-lsp/elixir_sense", only: [:dev, :test]}
]
end
defp aliases do
[
sobelow:
"sobelow --skip -i Config.Secrets --ignore-files lib/migration_generator/migration_generator.ex",
2022-11-04 06:04:41 +13:00
docs: ["docs", "ash.replace_doc_links"],
2022-07-14 06:29:49 +12:00
credo: "credo --strict",
"spark.formatter": "spark.formatter --extensions AshArchival.Resource"
2022-07-14 06:29:49 +12:00
]
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
end