mix.exs

defmodule SmoothieWorkerRuntime.MixProject do
  use Mix.Project

  @version "0.1.0"

  def project do
    [
      app: :smoothie_worker_runtime,
      version: @version,
      build_path: "../../_build",
      config_path: "../../config/config.exs",
      deps_path: "../../deps",
      lockfile: "../../mix.lock",
      elixir: "~> 1.17",
      start_permanent: Mix.env() == :prod,
      description: "Smoothie worker runtime and supervision layer",
      package: package(),
      deps: deps()
    ]
  end

  def application do
    [
      extra_applications: [:logger],
      mod: {Smoothie.Worker.Runtime.Application, []}
    ]
  end

  defp deps do
    if System.get_env("SMOOTHIE_HEX_PUBLISH") == "1" do
      [
        {:smoothie_worker_contract, "~> #{@version}"}
      ]
    else
      [
        {:smoothie_worker_contract, in_umbrella: true}
      ]
    end
  end

  defp package do
    [
      licenses: ["Apache-2.0"],
      links: %{"GitHub" => "https://github.com/Qwirklabs/smoothie"}
    ]
  end
end