# SPDX-FileCopyrightText: 2025 Isaak Tsalicoglou <isaak@overbring.com>
# SPDX-License-Identifier: BSD-3-Clause
defmodule DoTrace.MixProject do
  use Mix.Project

  @version "0.1.0"

  def project do
    [
      app: :do_trace,
      version: @version,
      elixir: "~> 1.14",
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      description: description(),
      package: package(),

      # Docs
      name: "DoTrace",
      source_url: "https://github.com/waseigo/do_trace",
      homepage_url: "https://overbring.com/open-source/do_trace",
      docs: [
        main: "readme",
        logo: "./etc/assets/logo_do_trace_sq.png",
        assets: %{"etc/assets" => "etc/assets"},
        extras: ["README.md"]
      ]
    ]
  end

  defp package do
    [
      files: ~w(
        lib
        .formatter.exs
        mix.exs
        README.md
        LICENSE
      ),
      maintainers: ["Isaak Tsalicoglou"],
      licenses: ["BSD-3-Clause"],
      links: %{"GitHub" => "https://github.com/waseigo/do_trace"}
    ]
  end

  defp description do
    """
    Provides a `trace/1` macro to trace function calls at runtime, mimicking Clojure's `dotrace` output.
    """
  end

  def application,
    do: [extra_applications: []]

  defp deps,
    do: [
      {:credo, "~> 1.7", only: [:dev, :test], runtime: false},
      {:ex_doc, "~> 0.38.2", only: :dev, runtime: false}
    ]
end
