2023-11-28 05:21:17 +13:00
|
|
|
defmodule AshMoney.MixProject do
|
|
|
|
use Mix.Project
|
|
|
|
|
2024-06-19 08:48:25 +12:00
|
|
|
@version "0.1.8"
|
2023-11-28 05:21:17 +13:00
|
|
|
|
|
|
|
@description """
|
2024-05-04 08:04:15 +12:00
|
|
|
The extension for working with money types in Ash.
|
2023-11-28 05:21:17 +13:00
|
|
|
"""
|
|
|
|
|
|
|
|
def project do
|
|
|
|
[
|
|
|
|
app: :ash_money,
|
|
|
|
version: @version,
|
|
|
|
elixir: "~> 1.15",
|
|
|
|
start_permanent: Mix.env() == :prod,
|
|
|
|
deps: deps(),
|
|
|
|
aliases: aliases(),
|
|
|
|
package: package(),
|
|
|
|
elixirc_paths: elixirc_paths(Mix.env()),
|
|
|
|
dialyzer: [plt_add_apps: [:ash]],
|
|
|
|
docs: docs(),
|
|
|
|
description: @description,
|
|
|
|
source_url: "https://github.com/ash-project/ash_money",
|
|
|
|
homepage_url: "https://github.com/ash-project/ash_money"
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Run "mix help compile.app" to learn about applications.
|
|
|
|
def application do
|
|
|
|
[
|
|
|
|
extra_applications: [:logger]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp package do
|
|
|
|
[
|
|
|
|
name: :ash_money,
|
|
|
|
licenses: ["MIT"],
|
|
|
|
files: ~w(lib .formatter.exs mix.exs README* LICENSE*
|
|
|
|
CHANGELOG* documentation),
|
|
|
|
links: %{
|
|
|
|
GitHub: "https://github.com/ash-project/ash_money"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp elixirc_paths(:test) do
|
|
|
|
elixirc_paths(:dev) ++ ["test/support"]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp elixirc_paths(_) do
|
|
|
|
["lib"]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp docs do
|
|
|
|
[
|
2024-05-04 08:04:15 +12:00
|
|
|
main: "readme",
|
2023-11-28 05:21:17 +13:00
|
|
|
source_ref: "v#{@version}",
|
|
|
|
logo: "logos/small-logo.png",
|
|
|
|
extra_section: "GUIDES",
|
|
|
|
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>
|
|
|
|
"""
|
|
|
|
end
|
|
|
|
end,
|
2024-01-13 10:50:37 +13:00
|
|
|
extras: [
|
2024-05-04 08:04:15 +12:00
|
|
|
{"README.md", title: "Home"},
|
2024-05-09 11:12:26 +12:00
|
|
|
"documentation/tutorials/getting-started-with-ash-money.md",
|
|
|
|
"CHANGELOG.md"
|
2024-01-13 10:50:37 +13:00
|
|
|
],
|
|
|
|
groups_for_extras: [
|
|
|
|
Tutorials: ~r'documentation/tutorials',
|
|
|
|
"How To": ~r'documentation/how_to',
|
|
|
|
Topics: ~r'documentation/topics',
|
2024-05-09 11:12:26 +12:00
|
|
|
DSLs: ~r'documentation/dsls',
|
|
|
|
"About AshMoney": [
|
|
|
|
"CHANGELOG.md"
|
|
|
|
]
|
2024-01-13 10:50:37 +13:00
|
|
|
],
|
2023-11-28 05:21:17 +13:00
|
|
|
groups_for_modules: [
|
|
|
|
AshMoney: [
|
|
|
|
AshMoney,
|
|
|
|
AshMoney.Types.Money
|
|
|
|
],
|
|
|
|
AshPostgres: [
|
|
|
|
AshMoney.AshPostgresExtension
|
|
|
|
],
|
|
|
|
Internals: ~r/.*/
|
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Run "mix help deps" to learn about dependencies.
|
|
|
|
defp deps do
|
|
|
|
[
|
2024-06-19 08:44:18 +12:00
|
|
|
{:ash, ash_version("~> 3.0 and >= 3.0.15")},
|
2023-11-28 05:21:17 +13:00
|
|
|
{:ex_money, "~> 5.15"},
|
2023-12-05 07:08:53 +13:00
|
|
|
{:ex_money_sql, "~> 1.0", optional: true},
|
2024-05-11 11:53:47 +12:00
|
|
|
{:ash_postgres, "~> 2.0", optional: true},
|
|
|
|
{:ash_graphql, "~> 1.0", optional: true},
|
2024-04-02 09:18:07 +13:00
|
|
|
# dev/test dependencies
|
2023-11-28 05:21:17 +13:00
|
|
|
{:ex_doc, github: "elixir-lang/ex_doc", only: [:dev, :test], runtime: false},
|
|
|
|
{:ex_check, "~> 0.12", 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},
|
|
|
|
{:git_ops, "~> 2.5", only: [:dev, :test]},
|
2024-04-23 02:14:06 +12:00
|
|
|
{:mix_test_watch, "~> 1.0", only: :dev, runtime: false},
|
|
|
|
{:mix_audit, ">= 0.0.0", only: [:dev, :test], runtime: false}
|
2023-11-28 05:21:17 +13:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp aliases do
|
|
|
|
[
|
|
|
|
sobelow: "sobelow --skip",
|
|
|
|
credo: "credo --strict",
|
|
|
|
docs: [
|
|
|
|
"docs",
|
|
|
|
"spark.replace_doc_links"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp ash_version(default_version) do
|
|
|
|
case System.get_env("ASH_VERSION") do
|
|
|
|
nil -> default_version
|
2024-01-04 19:23:37 +13:00
|
|
|
"local" -> [path: "../ash", override: true]
|
2023-11-28 05:21:17 +13:00
|
|
|
"main" -> [git: "https://github.com/ash-project/ash.git"]
|
|
|
|
version -> "~> #{version}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|