# SPDX-FileCopyrightText: 2025 James Harton # # SPDX-License-Identifier: Apache-2.0 defmodule BB.MixProject do use Mix.Project @moduledoc """ Beam Bots - The framework for resilient robotics. """ @version "0.7.0" def project do [ aliases: aliases(), app: :bb, consolidate_protocols: Mix.env() == :prod, deps: deps(), description: @moduledoc, dialyzer: dialyzer(), docs: docs(), elixir: "~> 1.19", elixirc_paths: elixirc_paths(Mix.env()), package: package(), start_permanent: Mix.env() == :prod, version: @version ] end defp dialyzer do [ plt_add_apps: [:mix] ] end defp package do [ maintainers: ["James Harton "], licenses: ["Apache-2.0"], links: %{ "Source" => "https://github.com/beam-bots/bb", "Sponsor" => "https://github.com/sponsors/jimsynz" } ] end # Run "mix help compile.app" to learn about applications. def application do [ extra_applications: [:logger, :xmerl], mod: {BB.Application, []} ] end defp docs do [ main: "readme", extras: ["README.md", "CHANGELOG.md"] |> Enum.concat(Path.wildcard("documentation/**/*.{md,livemd,cheatmd}")), groups_for_extras: [ Tutorials: ~r/tutorials\//, "DSL Reference": ~r/dsls\// ], source_ref: "main", source_url: "https://github.com/beam-bots/bb", before_closing_head_tag: &before_closing_head_tag/1 ] end defp before_closing_head_tag(:html) do """ """ end defp before_closing_head_tag(:epub), do: "" defp aliases do [ "spark.formatter": "spark.formatter --extensions BB.Dsl", "spark.cheat_sheets": "spark.cheat_sheets --extensions BB.Dsl" ] end # Run "mix help deps" to learn about dependencies. defp deps do [ {:ease, "~> 1.0"}, {:ex_cldr_numbers, "~> 2.36"}, {:ex_cldr_units, "~> 3.0"}, {:nx, "~> 0.10"}, {:spark, "~> 2.3"}, # dev/test {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}, {:ex_check, "~> 0.16", only: [:dev, :test], runtime: false}, {:ex_doc, ">= 0.0.0", only: [:dev, :test], runtime: false}, {:git_ops, "~> 2.9", only: [:dev, :test], runtime: false}, {:igniter, "~> 0.6", optional: true}, {:mimic, "~> 2.2", only: :test}, {:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false} ] end defp elixirc_paths(env) when env in [:dev, :test], do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] end