Current section
Files
Jump to
Current section
Files
foundry_stack
mix.exs
mix.exs
defmodule Foundry.MixProject do
use Mix.Project
@version "0.3.0"
@source_url "https://github.com/maxsvargal/foundry"
def project do
[
app: :foundry,
version: @version,
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
description: description(),
package: package(),
docs: docs(),
name: "Foundry"
]
end
# ⚠️ No `mod:`. ADR-035: everything with a supervision tree is the Studio's,
# and a library a target project pulls in as a dev dependency must not start
# processes in that project's application. What used to be
# `Foundry.Application` is now `FoundryWeb.Application`.
def application do
[extra_applications: [:logger, :runtime_tools]]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp description do
"Instruments for reading an Ash/Phoenix project: manifest, lint rules, " <>
"Spark introspection, scenario extraction, and the project context map."
end
defp package do
[
name: "foundry_stack",
licenses: ["MIT"],
links: %{"GitHub" => @source_url},
files: ~w(lib .formatter.exs mix.exs README.md)
]
end
defp docs do
[main: "readme", source_url: @source_url, extras: ["README.md"]]
end
# ADR-035 fixes the boundary: a dependency is required only when the library
# calls into it. Deps named as *atoms* -- `AshPaperTrail.Resource in
# Spark.extensions(module)` -- are `optional: true`, because comparing an atom
# literal compiles and runs whether or not the package is there. The Studio's
# own dependencies (ash_ai, req_llm, muontrap, swoosh, phoenix_pubsub) live in
# `apps/foundry_web`.
defp deps do
[
{:ash, "~> 3.20"},
{:jason, "~> 1.4"},
{:spark_meta, "~> 0.1"},
{:spark_lint, "~> 0.1"},
{:ex_tracer, "~> 0.1.1"},
{:scenario_tracer, "~> 0.1"},
# Extension detection only -- never called, only named.
{:ash_state_machine, "~> 0.2", optional: true},
{:ash_paper_trail, "~> 0.5", optional: true},
{:ash_archival, "~> 2.0", optional: true},
{:ex_doc, "~> 0.34", only: :dev, runtime: false}
]
end
defp aliases do
[
setup: ["deps.get"],
test: ["test"]
]
end
end