defmodule Tipalti.MixProject do use Mix.Project @version "1.0.0" @source_url "https://github.com/iamkanishka/tipalti" def project do [ app: :tipalti_client, version: @version, elixir: "~> 1.18", start_permanent: Mix.env() == :prod, elixirc_paths: elixirc_paths(Mix.env()), deps: deps(), description: description(), package: package(), name: "tipalti_client", source_url: @source_url, docs: docs(), dialyzer: [ plt_add_apps: [:mix, :ex_unit], plt_file: {:no_warn, "priv/plts/dialyzer.plt"}, flags: [:error_handling, :underspecs] ] ] end def application do [ extra_applications: [:logger, :crypto, :xmerl, :inets, :ssl], mod: {Tipalti.Application, []} ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp deps do [ # Deliberately minimal: the HTTP transport (Tipalti.HTTP) is built on the # OTP-bundled :httpc/:ssl rather than Req/Finch, so this package pulls in # only two small, dependency-free libraries instead of a large HTTP stack. {:jason, "~> 1.4"}, {:telemetry, "~> 1.3"}, # Dev/test tooling only. {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:bunt, "~> 1.0", only: [:dev, :test], runtime: false}, {:file_system, "~> 1.1", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}, {:erlex, "~> 0.2", only: [:dev, :test], runtime: false}, {:ex_doc, "~> 0.34", only: :dev, runtime: false}, {:earmark_parser, "~> 1.4", only: :dev, runtime: false}, {:makeup_elixir, "~> 0.16", only: :dev, runtime: false}, {:makeup_erlang, "~> 0.1", only: :dev, runtime: false}, {:nimble_parsec, "~> 1.4", only: :dev, runtime: false} ] end defp description do "A complete, production-grade Elixir client for the Tipalti API surface: " <> "the modern OAuth2 REST API, the legacy HMAC-signed SOAP Payee/Payer API, " <> "and the Procurement REST API, with pagination, retries, telemetry, and IPN webhook support." end defp package do [ name: "tipalti_client", licenses: ["MIT"], links: %{"GitHub" => @source_url}, files: ~w(lib mix.exs README.md CHANGELOG.md LICENSE .formatter.exs) ] end defp docs do [ main: "readme", extras: ["README.md", "CHANGELOG.md", "LICENSE"], groups_for_modules: [ REST: [Tipalti.Payees, Tipalti.Invoices, Tipalti.Payments, Tipalti.Auth.TokenServer], SOAP: [ Tipalti.SOAP.Payee, Tipalti.SOAP.Payer, Tipalti.SOAP.Client, Tipalti.SOAP.Signature ], Procurement: [Tipalti.Procurement.PurchaseOrders, Tipalti.Procurement.Employees], Support: [ Tipalti.Config, Tipalti.Client, Tipalti.Error, Tipalti.Pagination, Tipalti.Webhook, Tipalti.RateLimiter, Tipalti.Telemetry ] ] ] end end