defmodule Ussd.MixProject do use Mix.Project @source_url "https://github.com/spesohq/ussd" def project do [ app: :ussd, version: "0.2.0", elixir: "~> 1.13", start_permanent: Mix.env() == :prod, package: package(), name: "Ussd", description: description(), source_url: @source_url, deps: deps(), docs: docs() ] end # Run "mix help compile.app" to learn about applications. def application do [ mod: {Ussd.Application, []}, extra_applications: [:logger, :crypto] ] end # Run "mix help deps" to learn about dependencies. defp deps do [ {:telemetry, "~> 1.0"}, {:gettext, "~> 0.20", optional: true}, {:ex_doc, "~> 0.14", only: :dev, runtime: false}, {:credo, "~> 1.6", only: [:dev, :test], runtime: false} ] end defp description() do "Build Ussd (Unstructured Supplementary Service Data) applications in Elixir without breaking a sweat." end defp package() do [ maintainers: ["Benjamin Manford"], files: ~w(lib priv test .formatter.exs mix.exs README* GUIDE* CHANGELOG* LICENSE), licenses: ["MIT"], links: %{"GitHub" => @source_url} ] end defp docs do [ main: "readme", extras: ["README.md", "GUIDE.md", "CHANGELOG.md", "LICENSE"], groups_for_modules: [ Core: [Ussd, Ussd.Context, Ussd.Menu, Ussd.Record, Ussd.ContinuingMode], "Flow contracts": [ Ussd.State, Ussd.Action, Ussd.ContinueState, Ussd.Pagination, Ussd.Configurator, Ussd.ExceptionHandler ], Decisions: [Ussd.Decision | decision_modules()], Responses: [Ussd.Response | response_modules()], Cache: [Ussd.Cache, Ussd.Cache.ETS], Testing: [Ussd.Test], Exceptions: ~r/^Ussd\.Exceptions\./, "Mix tasks": ~r/^Mix\.Tasks\.Ussd\./ ] ] end defp decision_modules do [ Ussd.Decisions.Between, Ussd.Decisions.Equal, Ussd.Decisions.Fallback, Ussd.Decisions.GreaterThan, Ussd.Decisions.GreaterThanOrEqualTo, Ussd.Decisions.In, Ussd.Decisions.IsNumeric, Ussd.Decisions.Length, Ussd.Decisions.LessThan, Ussd.Decisions.LessThanOrEqualTo, Ussd.Decisions.NotBetween, Ussd.Decisions.NotEqual, Ussd.Decisions.NotIn, Ussd.Decisions.Regex ] end defp response_modules do [ Ussd.Responses.AfricasTalking, Ussd.Responses.Arkesel, Ussd.Responses.Moolre, Ussd.Responses.Nalo, Ussd.Responses.Nsano, Ussd.Responses.Speso ] end end