ash_double_entry/mix.exs

157 lines
4.4 KiB
Elixir
Raw Normal View History

2023-07-22 12:27:52 +12:00
defmodule AshDoubleEntry.MixProject do
use Mix.Project
2024-08-04 11:06:50 +12:00
@version "1.0.6"
2023-08-19 15:57:12 +12:00
@description """
A customizable double entry bookkeeping system backed by Ash resources.
"""
2023-07-22 12:27:52 +12:00
def project do
[
app: :ash_double_entry,
version: @version,
2023-07-22 12:27:52 +12:00
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() != :test,
2023-08-19 15:57:12 +12:00
description: @description,
2023-08-06 16:45:07 +12:00
aliases: aliases(),
2023-08-19 15:57:12 +12:00
deps: deps(),
package: package(),
docs: docs(),
source_url: "https://github.com/ash-project/ash_double_entry",
homepage_url: "https://github.com/ash-project/ash_double_entry",
consolidate_protocols: Mix.env() != :test
2023-07-22 12:27:52 +12:00
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
2023-08-19 15:57:12 +12:00
defp package do
[
name: :ash_double_entry,
licenses: ["MIT"],
files: ~w(lib .formatter.exs mix.exs README* LICENSE*
CHANGELOG* documentation),
links: %{
GitHub: "https://github.com/ash-project/ash_double_entry"
}
]
end
2023-08-06 16:45:07 +12:00
defp aliases do
[
sobelow: "sobelow --skip",
credo: "credo --strict",
2023-09-27 02:46:07 +13:00
docs: [
"spark.cheat_sheets",
"docs",
"spark.replace_doc_links",
2023-09-27 02:46:07 +13:00
"spark.cheat_sheets_in_search"
],
2023-08-06 16:45:07 +12:00
"spark.formatter":
2023-09-27 02:46:07 +13:00
"spark.formatter --extensions AshDoubleEntry.Account,AshDoubleEntry.Balance,AshDoubleEntry.Transfer",
"spark.cheat_sheets":
"spark.cheat_sheets --extensions AshDoubleEntry.Account,AshDoubleEntry.Balance,AshDoubleEntry.Transfer",
"spark.cheat_sheets_in_search":
"spark.cheat_sheets_in_search --extensions AshDoubleEntry.Account,AshDoubleEntry.Balance,AshDoubleEntry.Transfer"
2023-08-06 16:45:07 +12:00
]
end
2023-08-19 15:57:12 +12:00
defp docs do
[
2024-05-04 12:53:32 +12:00
main: "readme",
2023-08-19 15:57:12 +12:00
source_ref: "v#{@version}",
logo: "logos/small-logo.png",
2023-10-03 02:28:11 +13:00
before_closing_head_tag: fn type ->
if type == :html do
"""
<script>
if (location.hostname === "hexdocs.pm") {
var script = document.createElement("script");
script.src = "https://plausible.io/js/script.js";
script.setAttribute("defer", "defer")
script.setAttribute("data-domain", "ashhexdocs")
document.head.appendChild(script);
}
</script>
2023-10-03 02:28:11 +13:00
"""
end
end,
2024-01-13 10:55:34 +13:00
extras: [
2024-05-04 12:53:32 +12:00
{"README.md", title: "Home"},
"documentation/tutorials/getting-started-with-ash-double-entry.md",
2024-01-13 10:55:34 +13:00
"documentation/dsls/DSL:-AshDoubleEntry.Account.md",
"documentation/dsls/DSL:-AshDoubleEntry.Balance.md",
2024-05-09 11:13:23 +12:00
"documentation/dsls/DSL:-AshDoubleEntry.Transfer.md",
"CHANGELOG.md"
2024-01-13 10:55:34 +13:00
],
groups_for_extras: [
Tutorials: ~r'documentation/tutorials',
"How To": ~r'documentation/how_to',
Topics: ~r'documentation/topics',
2024-05-09 11:13:23 +12:00
DSLs: ~r'documentation/dsls',
"About AshDoubleEntry": [
"CHANGELOG.md"
]
2023-08-19 15:57:12 +12:00
],
groups_for_modules: [
2023-09-27 02:46:07 +13:00
Introspection: [
AshDoubleEntry.Account.Info,
AshDoubleEntry.Balance.Info,
AshDoubleEntry.Transfer.Info
],
Entities: [
AshDoubleEntry.Account,
AshDoubleEntry.Balance,
AshDoubleEntry.Transfer
],
Types: [
AshDoubleEntry.ULID
],
AshDoubleEntry: ~r/AshDoubleEntry.*/
2023-08-19 15:57:12 +12:00
]
]
end
2023-07-22 12:27:52 +12:00
# Run "mix help deps" to learn about dependencies.
defp deps do
[
2024-05-11 11:57:16 +12:00
{:ash, ash_version("~> 3.0")},
{:ash_money, "~> 0.1"},
2023-12-06 13:49:23 +13:00
{:ex_money_sql, "~> 1.10"},
2024-04-02 10:21:49 +13:00
# dev/test dependencies
2023-08-19 16:17:07 +12:00
{:git_ops, "~> 2.5", only: [:dev, :test]},
{:ex_doc, github: "elixir-lang/ex_doc", only: [:dev, :test], runtime: false},
2023-08-19 16:17:07 +12:00
{: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},
2024-04-25 00:57:43 +12:00
{:mix_audit, ">= 0.0.0", only: [:dev, :test], runtime: false}
2023-07-22 12:27:52 +12:00
]
end
2023-08-19 16:17:07 +12:00
defp ash_version(default_version) do
case System.get_env("ASH_VERSION") do
nil ->
default_version
"local" ->
2023-12-06 17:12:32 +13:00
[path: "../ash", override: true]
2023-08-19 16:17:07 +12:00
"main" ->
2023-12-06 17:12:32 +13:00
[git: "https://github.com/ash-project/ash.git", override: true]
2023-08-19 16:17:07 +12:00
version when is_binary(version) ->
"~> #{version}"
version ->
version
end
end
2023-07-22 12:27:52 +12:00
end