2023-08-07 15:13:01 +12:00
|
|
|
defmodule AshCubDB.MixProject do
|
|
|
|
use Mix.Project
|
|
|
|
|
2023-10-02 15:23:00 +13:00
|
|
|
@version "0.3.0"
|
2023-08-07 15:13:01 +12:00
|
|
|
|
|
|
|
@moduledoc """
|
|
|
|
A CubDB data layer for `Ash` resources.
|
|
|
|
"""
|
|
|
|
|
|
|
|
def project do
|
|
|
|
[
|
|
|
|
app: :ash_cubdb,
|
|
|
|
version: @version,
|
|
|
|
elixir: "~> 1.15",
|
|
|
|
start_permanent: Mix.env() == :prod,
|
2023-08-07 17:47:06 +12:00
|
|
|
consolidate_protocols: Mix.env() != :test,
|
|
|
|
elixirc_paths: elixirc_paths(Mix.env()),
|
2023-08-07 15:13:01 +12:00
|
|
|
deps: deps(),
|
|
|
|
description: @moduledoc,
|
|
|
|
package: package(),
|
|
|
|
source_url: "https://code.harton.nz/james/ash_cubdb",
|
|
|
|
homepage_url: "https://code.harton.nz/james/ash_cubdb",
|
2023-08-07 17:47:06 +12:00
|
|
|
aliases: aliases(),
|
|
|
|
dialyzer: [plt_add_apps: [:faker, :smokestack]],
|
|
|
|
docs: [
|
|
|
|
main: "AshCubDB",
|
|
|
|
extra_section: "Guides",
|
|
|
|
formatters: ["html"],
|
|
|
|
filter_modules: ~r/^Elixir.AshCubDB/,
|
|
|
|
source_url_pattern:
|
|
|
|
"https://code.harton.nz/james/ash_cub_db/src/branch/main/%{path}#L%{line}",
|
|
|
|
spark: [
|
|
|
|
extensions: [
|
|
|
|
%{
|
|
|
|
module: AshCubDB.DataLayer,
|
|
|
|
name: "AshCubDB.DataLayer",
|
|
|
|
target: "Ash.Resource",
|
|
|
|
type: "Ash.DataLayer"
|
|
|
|
}
|
|
|
|
]
|
2023-09-30 10:30:54 +13:00
|
|
|
],
|
|
|
|
extras:
|
|
|
|
["README.md"]
|
|
|
|
|> Enum.concat(Path.wildcard("documentation/**/*.{md,livemd,cheatmd}"))
|
|
|
|
|> Enum.map(fn
|
|
|
|
"README.md" -> {:"README.md", title: "Read Me", ash_hq?: false}
|
|
|
|
"documentation/" <> _ = path -> {String.to_atom(path), []}
|
|
|
|
end),
|
|
|
|
groups_for_extras:
|
|
|
|
"documentation/*"
|
|
|
|
|> Path.wildcard()
|
|
|
|
|> Enum.map(fn dir ->
|
|
|
|
name =
|
|
|
|
dir
|
|
|
|
|> Path.split()
|
|
|
|
|> List.last()
|
|
|
|
|> String.split(~r/_+/)
|
|
|
|
|> Enum.map_join(" ", &String.capitalize/1)
|
|
|
|
|
|
|
|
files = dir |> Path.join("**.{md,livemd,cheatmd}") |> Path.wildcard()
|
|
|
|
{name, files}
|
|
|
|
end)
|
2023-08-07 17:47:06 +12:00
|
|
|
]
|
2023-08-07 15:13:01 +12:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def package do
|
|
|
|
[
|
|
|
|
maintainers: ["James Harton <james@harton.nz>"],
|
|
|
|
licenses: ["HL3-FULL"],
|
|
|
|
links: %{
|
|
|
|
"Source" => "https://code.harton.nz/james/ash_cubdb"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Run "mix help compile.app" to learn about applications.
|
|
|
|
def application do
|
|
|
|
[
|
|
|
|
extra_applications: [:logger],
|
|
|
|
mod: {AshCubDB.Application, []}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Run "mix help deps" to learn about dependencies.
|
|
|
|
defp deps do
|
|
|
|
opts = [only: ~w[dev test]a, runtime: false]
|
|
|
|
|
|
|
|
[
|
2023-08-07 17:47:06 +12:00
|
|
|
{:ash, "~> 2.13"},
|
2023-08-07 15:13:01 +12:00
|
|
|
{:cubdb, "~> 2.0"},
|
2023-08-07 17:47:06 +12:00
|
|
|
{:spark, "~> 1.1 and >= 1.1.39"},
|
2023-08-07 15:13:01 +12:00
|
|
|
{:credo, "~> 1.7", opts},
|
|
|
|
{:dialyxir, "~> 1.3", opts},
|
|
|
|
{:doctor, "~> 0.21", opts},
|
|
|
|
{:earmark, ">= 0.0.0", opts},
|
|
|
|
{:ex_check, "~> 0.15", opts},
|
|
|
|
{:ex_doc, ">= 0.0.0", opts},
|
2023-08-07 17:47:06 +12:00
|
|
|
{:faker, "~> 0.17", opts},
|
2023-08-07 15:13:01 +12:00
|
|
|
{:git_ops, "~> 2.6", opts},
|
2023-08-07 17:47:06 +12:00
|
|
|
{:mix_audit, "~> 2.1", opts},
|
2023-09-29 21:22:01 +13:00
|
|
|
{:smokestack, "~> 0.4", opts}
|
2023-08-07 15:13:01 +12:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp aliases do
|
|
|
|
[
|
2023-08-07 17:47:06 +12:00
|
|
|
"spark.formatter": "spark.formatter --extensions=AshCubDB.DataLayer",
|
|
|
|
"spark.cheat_sheets": "spark.cheat_sheets --extensions=AshCubDB.DataLayer"
|
2023-08-07 15:13:01 +12:00
|
|
|
]
|
|
|
|
end
|
2023-08-07 17:47:06 +12:00
|
|
|
|
|
|
|
defp elixirc_paths(env) when env in ~w[dev test]a, do: ~w[lib test/support]
|
|
|
|
defp elixirc_paths(_), do: ~w[lib]
|
2023-08-07 15:13:01 +12:00
|
|
|
end
|