Current section
Files
Jump to
Current section
Files
mix.exs
# SPDX-FileCopyrightText: 2025 ash_neo4j contributors <https://github.com/diffo-dev/ash_neo4j/graphs.contributors>
#
# SPDX-License-Identifier: MIT
defmodule AshNeo4j.MixProject do
@moduledoc false
use Mix.Project
@version "0.7.0"
@name "AshNeo4j"
@description "Ash DataLayer for Neo4j"
@github_url "https://github.com/diffo-dev/ash_neo4j"
def project do
[
app: :ash_neo4j,
version: @version,
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
package: package(),
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
docs: &docs/0,
dialyzer: [plt_add_apps: [:jason, :mix], ignore_warnings: ".dialyzer_ignore.exs"],
test_coverage: [
tool: ExCoveralls,
summary: [
threshold: 70
]
],
consolidate_protocols: Mix.env() == :prod,
aliases: aliases(),
name: @name,
source_url: @github_url,
homepage_url: "https://diffo.dev/diffo/ash_neo4j",
description: @description,
usage_rules: usage_rules()
]
end
defp usage_rules do
[
skills: [
location: ".claude/skills",
# Pull in pre-built skills shipped directly by packages
package_skills: [:bolty, ~r/^bolty/]
]
]
end
def cli do
[
preferred_envs: [
coveralls: :test,
"coveralls.github": :test
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def docs do
[
homepage_url: @github_url,
source_url: @github_url,
source_ref: "v#{@version}",
main: "readme",
extras: [
{"README.md", title: "Home"},
{"LICENSES/MIT.md", title: "License"},
{"ash_neo4j_datalayer.livemd", title: "AshNeo4j Livebook"},
{"documentation/dsls/DSL-AshNeo4j.DataLayer.md", search_data: Spark.Docs.search_data_for(AshNeo4j.DataLayer)},
"CHANGELOG.md"
],
groups_for_extras: [
Tutorials: ~r'documentation/tutorials',
"How To": [~r'documentation/how_to', "ash_neo4j_datalayer.livemd"],
Topics: ~r'documentation/topics',
DSLs: ~r'documentation/dsls',
"About AshNeo4j": [
"CHANGELOG.md"
]
],
logo: "logos/diffo.jpg",
groups_for_modules: [
AshNeo4j: [
AshNeo4j,
AshNeo4j.DataLayer,
AshNeo4j.Sandbox
],
Introspection: [
AshNeo4j.DataLayer.Info,
AshNeo4j.Resource.Info,
AshNeo4j.EdgeDescriptor,
AshNeo4j.ResourceMapping
],
Cypher: ~r/AshNeo4j\.Cypher/,
Utilities: [
AshNeo4j.BoltyHelper,
AshNeo4j.Neo4jHelper,
AshNeo4j.QueryHelper,
AshNeo4j.Util
],
Internals: ~r/.*/
]
]
end
defp package do
[
maintainers: [
"Matt Beanland <matt@diffo.dev>"
],
licenses: ["MIT"],
files:
~w(lib .formatter.exs mix.exs README* LICENSE* CHANGELOG* documentation usage-rules.md usage-rules ash_neo4j_datalayer.livemd),
links: %{
"GitHub" => "https://github.com/diffo-dev/ash_neo4j",
"Changelog" => "https://github.com/diffo-dev/ash_neo4j/blob/main/CHANGELOG.md",
"Website" => "https://diffo.dev",
"REUSE Compliance" => "https://api.reuse.software/info/github.com/diffo-dev/ash_neo4j"
}
]
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("~> 3.0 and >= 3.24.2")},
{:spark, ">= 2.7.0"},
{:ash_state_machine, "~> 0.2.12", only: [:dev, :test]},
{:bolty, bolty_version(">= 0.0.13")},
{:jason, "~> 1.4"},
{:igniter, ">= 0.6.29 and < 1.0.0-0", [env: :prod, hex: "igniter", repo: "hexpm", optional: true]},
{:ex_doc, "~> 0.37", only: [:dev, :test], runtime: false},
{:ex_check, "~> 0.12", only: [:dev, :test]},
{:git_ops, "~> 2.7", only: [:dev], runtime: false},
{:credo, ">= 1.7.16", only: [:dev, :test], runtime: false},
{:dialyxir, ">= 1.4.3", only: [:dev, :test], runtime: false},
{:sobelow, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18.0", only: [:dev, :test]},
{:mix_audit, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:usage_rules, "~> 1.2", optional: true}
]
end
defp bolty_version(default_version) do
case System.get_env("BOLTY_VERSION") do
nil -> default_version
"local" -> [path: "../bolty"]
"main" -> [git: "https://github.com/diffo-dev/bolty.git"]
version -> "~> #{version}"
end
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
defp aliases do
[
sobelow: "sobelow --skip",
credo: "credo --strict",
docs: [
"spark.cheat_sheets",
"docs",
"spark.replace_doc_links"
],
"spark.formatter": "spark.formatter --extensions AshNeo4j.DataLayer,AshNeo4j.DataLayer.Domain",
"spark.cheat_sheets": "spark.cheat_sheets --extensions AshNeo4j.DataLayer,AshNeo4j.DataLayer.Domain"
]
end
end