defmodule LeanLmdb.MixProject do use Mix.Project @version "0.2.0" @source_url "https://github.com/mindreframer/lean_lmdb" @authors ["Roman Heinrich "] def project do [ app: :lean_lmdb, version: @version, elixir: "~> 1.20", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, description: "Fast, safe, and ergonomic LMDB storage for Elixir, powered by Rust", source_url: @source_url, homepage_url: @source_url, authors: @authors, package: package(), docs: docs(), deps: deps() ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_env), do: ["lib"] def application do [extra_applications: [:logger]] end defp package do [ licenses: ["MIT"], maintainers: @authors, links: %{ "Source" => @source_url, "Changelog" => "#{@source_url}/blob/main/CHANGELOG.md" }, build_tools: ["mix", "cargo"], files: [ "lib", "native/lean_lmdb_nif/src", "native/lean_lmdb_nif/Cargo.toml", "native/lean_lmdb_nif/Cargo.lock", ".cargo/config.toml", "rust-toolchain.toml", ".formatter.exs", "mix.exs", "README.md", "LICENSE", "CHANGELOG.md" ] ++ Path.wildcard("checksum-Elixir.LeanLmdb.Native.exs") ] end defp docs do [ main: "readme", extras: ["README.md", "CHANGELOG.md"], source_ref: "v#{@version}", source_url: @source_url, authors: @authors, formatters: ["html"] ] end defp deps do [ {:benchee, "~> 1.5", only: :dev}, {:benchee_html, "~> 1.0", only: :dev}, {:benchee_json, "~> 1.0", only: :dev}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:ex_doc, "~> 0.40", only: :dev, runtime: false}, {:rustler, "~> 0.38.0", optional: true, runtime: false}, {:rustler_precompiled, "~> 0.8.0"} ] end end