defmodule ExDav.MixProject do use Mix.Project @version "0.5.0" @source_url "https://git.sr.ht/~sbr/ExDav" def project do [ app: :ex_dav, version: @version, elixir: "~> 1.15", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, deps: deps(), description: description(), package: package(), name: "ExDav", source_url: @source_url, dialyzer: dialyzer() ] ++ umbrella_paths() end defp dialyzer do [ plt_add_apps: [:ex_unit, :mix], flags: [:error_handling, :unknown, :underspecs], ignore_warnings: ".dialyzer_ignore.exs" ] end def application do [extra_applications: [:logger]] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp deps do [ {:plug, "~> 1.16"}, {:ecto_sql, "~> 3.13"}, {:postgrex, ">= 0.0.0"}, {:sweet_xml, "~> 0.7"}, {:xml_builder, "~> 2.3"}, {:ex_doc, "~> 0.34", only: :dev, runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false} ] end defp description do """ CalDAV server library — mount as a Plug, bring your own storage adapter. Heavily WIP / beta software; APIs may change between releases. """ end defp package do [ licenses: ["BSD-3-Clause"], links: %{"sourcehut" => @source_url}, files: ~w(lib mix.exs README.md CHANGELOG.md LICENSE .formatter.exs) ] end # Only include umbrella-relative paths when actually inside the umbrella. # When consumed as a hex dep these dirs don't exist alongside this mix.exs. defp umbrella_paths do if File.exists?("../../mix.exs") do [ build_path: "../../_build", config_path: "../../config/config.exs", deps_path: "../../deps", lockfile: "../../mix.lock" ] else [] end end end