2023-04-22 16:46:04 +12:00
|
|
|
defmodule AshOban.MixProject do
|
|
|
|
use Mix.Project
|
|
|
|
|
2024-05-11 10:59:18 +12:00
|
|
|
@version "0.2.3"
|
2023-04-22 16:46:04 +12:00
|
|
|
|
|
|
|
@description """
|
2024-05-04 07:29:28 +12:00
|
|
|
The extension for integrating Ash resources with Oban.
|
2023-04-22 16:46:04 +12:00
|
|
|
"""
|
|
|
|
|
|
|
|
def project do
|
|
|
|
[
|
|
|
|
app: :ash_oban,
|
|
|
|
version: @version,
|
|
|
|
elixir: "~> 1.14",
|
|
|
|
start_permanent: Mix.env() == :prod,
|
|
|
|
package: package(),
|
|
|
|
aliases: aliases(),
|
|
|
|
deps: deps(),
|
|
|
|
elixirc_paths: elixirc_paths(Mix.env()),
|
|
|
|
dialyzer: [plt_add_apps: [:ash]],
|
|
|
|
docs: docs(),
|
|
|
|
description: @description,
|
|
|
|
source_url: "https://github.com/ash-project/ash_oban",
|
|
|
|
homepage_url: "https://github.com/ash-project/ash_oban"
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2024-02-21 07:02:43 +13:00
|
|
|
def cli do
|
|
|
|
[
|
|
|
|
preferred_envs: [
|
|
|
|
"test.gen.migration": :test,
|
|
|
|
"test.migrate": :test,
|
|
|
|
"test.create": :test
|
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2023-04-22 16:46:04 +12:00
|
|
|
defp package do
|
|
|
|
[
|
|
|
|
name: :ash_oban,
|
|
|
|
licenses: ["MIT"],
|
|
|
|
files: ~w(lib .formatter.exs mix.exs README* LICENSE*
|
|
|
|
CHANGELOG* documentation),
|
|
|
|
links: %{
|
|
|
|
GitHub: "https://github.com/ash-project/ash_oban"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp elixirc_paths(:test) do
|
|
|
|
elixirc_paths(:dev) ++ ["test/support"]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp elixirc_paths(_) do
|
|
|
|
["lib"]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp docs do
|
|
|
|
[
|
2024-05-04 07:29:28 +12:00
|
|
|
main: "readme",
|
2023-04-22 16:46:04 +12:00
|
|
|
source_ref: "v#{@version}",
|
|
|
|
logo: "logos/small-logo.png",
|
|
|
|
extra_section: "GUIDES",
|
2024-01-13 10:43:36 +13:00
|
|
|
extras: [
|
2024-05-04 07:29:28 +12:00
|
|
|
{"README.md", title: "Home"},
|
|
|
|
"documentation/tutorials/getting-started-with-ash-oban.md",
|
2024-05-09 11:11:48 +12:00
|
|
|
"documentation/dsls/DSL:-AshOban.md",
|
|
|
|
"CHANGELOG.md"
|
2024-01-13 10:43:36 +13:00
|
|
|
],
|
|
|
|
groups_for_extras: [
|
|
|
|
Tutorials: ~r'documentation/tutorials',
|
|
|
|
"How To": ~r'documentation/how_to',
|
|
|
|
Topics: ~r'documentation/topics',
|
2024-05-09 11:11:48 +12:00
|
|
|
DSLs: ~r'documentation/dsls',
|
|
|
|
"About AshOban": [
|
|
|
|
"CHANGELOG.md"
|
|
|
|
]
|
2023-04-22 16:46:04 +12:00
|
|
|
],
|
|
|
|
groups_for_modules: [
|
2023-09-17 03:17:40 +12:00
|
|
|
AshOban: [
|
|
|
|
AshOban
|
|
|
|
],
|
|
|
|
Utilities: [
|
|
|
|
AshOban.Changes.BuiltinChanges,
|
|
|
|
AshOban.Changes.RunObanTrigger
|
|
|
|
],
|
|
|
|
Authorization: [
|
|
|
|
AshOban.Checks.AshObanInteraction
|
|
|
|
],
|
|
|
|
Introspection: [
|
|
|
|
AshOban.Info,
|
2024-01-13 10:44:06 +13:00
|
|
|
AshOban.Trigger,
|
|
|
|
AshOban.Schedule
|
2023-09-17 03:17:40 +12:00
|
|
|
],
|
|
|
|
Testing: [
|
|
|
|
AshOban.Test
|
2024-01-13 10:44:06 +13:00
|
|
|
]
|
2023-04-22 16:46:04 +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
|
2023-05-02 10:13:09 +12:00
|
|
|
oban_dep =
|
2023-05-02 10:22:48 +12:00
|
|
|
if System.get_env("ASH_OBAN_CI_OBAN_PRO") == "false" do
|
2023-05-02 10:13:09 +12:00
|
|
|
[]
|
2023-05-02 10:22:48 +12:00
|
|
|
else
|
2024-02-21 07:14:02 +13:00
|
|
|
# We can't currently use this as we don't have a license for oban_pro that we can use
|
|
|
|
# [{:oban_pro, "~> 1.0", repo: "oban", only: [:dev,]}]
|
|
|
|
[]
|
2023-05-02 10:13:09 +12:00
|
|
|
end
|
|
|
|
|
|
|
|
oban_dep ++
|
|
|
|
[
|
2024-05-11 10:59:18 +12:00
|
|
|
{:ash, "~> 3.0"},
|
2023-05-02 10:13:09 +12:00
|
|
|
{:oban, "~> 2.15"},
|
2024-03-30 12:52:22 +13:00
|
|
|
{:postgrex, "~> 0.17.4"},
|
|
|
|
# dev/test dependencies
|
|
|
|
{:simple_sat, "~> 0.1"},
|
2023-05-02 10:13:09 +12:00
|
|
|
{:ex_doc, "~> 0.22", only: [:dev, :test], runtime: false},
|
2023-09-17 03:17:40 +12:00
|
|
|
{:ex_check, "~> 0.12", only: [:dev, :test]},
|
2023-05-02 10:13:09 +12:00
|
|
|
{: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},
|
2023-09-17 03:17:40 +12:00
|
|
|
{:git_ops, "~> 2.5", only: [:dev, :test]},
|
2024-04-23 01:34:48 +12:00
|
|
|
{:excoveralls, "~> 0.13", only: [:dev, :test]},
|
|
|
|
{:mix_audit, ">= 0.0.0", only: [:dev, :test], runtime: false}
|
2023-05-02 10:13:09 +12:00
|
|
|
]
|
2023-04-22 16:46:04 +12:00
|
|
|
end
|
|
|
|
|
|
|
|
defp aliases do
|
|
|
|
[
|
|
|
|
sobelow: "sobelow --skip",
|
|
|
|
credo: "credo --strict",
|
2023-09-17 03:17:40 +12:00
|
|
|
docs: [
|
|
|
|
"spark.cheat_sheets",
|
|
|
|
"docs",
|
2023-10-06 02:04:33 +13:00
|
|
|
"spark.replace_doc_links",
|
2023-09-17 03:17:40 +12:00
|
|
|
"spark.cheat_sheets_in_search"
|
|
|
|
],
|
2024-04-06 12:51:37 +13:00
|
|
|
"test.migrate": ["ecto.migrate"],
|
|
|
|
"test.create": ["ecto.create"],
|
2023-09-17 03:17:40 +12:00
|
|
|
"spark.formatter": "spark.formatter --extensions AshOban",
|
|
|
|
"spark.cheat_sheets": "spark.cheat_sheets --extensions AshOban",
|
2024-02-21 07:02:43 +13:00
|
|
|
"spark.cheat_sheets_in_search": "spark.cheat_sheets_in_search --extensions AshOban",
|
2024-02-21 07:50:56 +13:00
|
|
|
"ecto.gen.migration": "ecto.gen.migration --migrations-path=test_migrations",
|
|
|
|
"ecto.migrate": "ecto.migrate --migrations-path=test_migrations",
|
|
|
|
"ecto.setup": ["ecto.create", "ecto.migrate"]
|
2023-04-22 16:46:04 +12:00
|
|
|
]
|
|
|
|
end
|
|
|
|
end
|