defmodule ExRingRing.MixProject do use Mix.Project def project do [ app: :ex_ring_ring, version: "0.1.1", elixir: "~> 1.17", start_permanent: Mix.env() == :prod, deps: deps(), aliases: aliases(), test_paths: ["test"], test_load_filters: [&String.ends_with?(&1, "_test.exs")], test_ignore_filters: [&String.starts_with?(&1, "test/support/")], dialyzer: [ plt_add_apps: [:ex_unit, :mix], flags: [:unmatched_returns, :error_handling, :underspecs] ], name: "ExRingRing", source_url: "https://github.com/ohhi-vn/ex_ring_ring", homepage_url: "https://github.com/ohhi-vn/ex_ring_ring", docs: docs(), package: package(), elixirc_paths: elixirc_paths(Mix.env()), test_coverage: [ tool: Mix.Tasks.Test.Coverage, output: "cover", summary: [threshold: 85] ], consolidate_protocols: Mix.env() != :test, test_elixirc_options: [debug_info: true] ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] def application do [ extra_applications: [:logger] ] end defp package do [ description: "Consistent Hash Ring implementation in Elixir with Clean Architecture", licenses: ["Apache-2.0"], links: %{ "GitHub" => "https://github.com/ohhi-vn/ex_ring_ring", "Documentation" => "https://hexdocs.pm/ex_ring_ring" }, files: ~w(lib .formatter.exs mix.exs README* LICENSE* guides) ] end defp docs do [ main: "ExRingRing", extras: [ "README.md", "guides/getting_started.md", "guides/architecture.md", "guides/configuration.md", "guides/implementation_strategies.md" ], groups_for_modules: [ Core: [ ExRingRing, ExRingRing.Domain.Entities.Ring, ExRingRing.Domain.Entities.Node, ExRingRing.Domain.ValueObjects.VirtualNode, ExRingRing.Domain.ValueObjects.HashConfig ], "Domain Services": [ ExRingRing.Domain.Services.HashRing, ExRingRing.Domain.Services.HashAlgorithm ], "Application Layer": [ ExRingRing.Application.Services.HashRingService, ExRingRing.Application.UseCases.CreateRing, ExRingRing.Application.UseCases.AddNodes, ExRingRing.Application.UseCases.RemoveNodes, ExRingRing.Application.UseCases.FindNode, ExRingRing.Application.UseCases.CollectNodes ], "Ring Implementations": [ ExRingRing.Infrastructure.HashRing.Static, ExRingRing.Infrastructure.HashRing.Dynamic, ExRingRing.Infrastructure.HashRing.Base ], "Hash Algorithms": [ ExRingRing.Infrastructure.HashAlgorithms, ExRingRing.Infrastructure.HashAlgorithms.MD5, ExRingRing.Infrastructure.HashAlgorithms.SHA, ExRingRing.Infrastructure.HashAlgorithms.SHA256, ExRingRing.Infrastructure.HashAlgorithms.CRC32, ExRingRing.Infrastructure.HashAlgorithms.PHash2 ] ] ] end defp deps do [ {:ex_doc, "~> 0.30", only: :dev, runtime: false}, {:ex_check, "~> 0.9", only: [:test], runtime: false}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false} ] end defp aliases do [ test: ["test --exclude integration"], "test.unit": ["test --exclude integration"], "test.all": ["test"], "test.ci": ["credo --strict", "test --exclude integration"], # Code Quality quality: ["format --check-formatted", "credo --strict", "dialyzer"], # Coverage cover: ["test --cover"] ] end end