defmodule Nombaone.MixProject do use Mix.Project @version "0.1.0" @source_url "https://github.com/nombaone/nombaone-elixir" def project do [ app: :nombaone, version: @version, elixir: "~> 1.15", elixirc_options: [warnings_as_errors: true], elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, deps: deps(), aliases: aliases(), dialyzer: dialyzer(), test_coverage: [summary: [threshold: 0]], # Hex description: description(), package: package(), # Docs name: "Nomba One", source_url: @source_url, docs: docs() ] end def application do # A library, not a supervised app. `:inets` provides `:httpc` (our # zero-dependency HTTP transport); `:ssl`/`:public_key`/`:crypto` back # TLS verification, HMAC, and CA-store access. [ extra_applications: [:logger, :crypto, :inets, :ssl, :public_key] ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp deps do [ {:jason, "~> 1.4"}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}, {:ex_doc, "~> 0.34", only: :dev, runtime: false} ] end defp aliases do [ # `mix test` runs unit + conformance (the live suite is tagged # `:integration` and excluded by default in test/test_helper.exs). Run the # live suite with: `mix test --only integration` (needs NOMBAONE_API_KEY). check: ["format --check-formatted", "credo --strict", "test"] ] end defp dialyzer do [ plt_local_path: "priv/plts", plt_core_path: "priv/plts", flags: [:error_handling, :extra_return, :missing_return, :unknown] ] end defp description do "The official Elixir SDK for the Nomba One subscription-billing API — " <> "recurring billing for Nigeria over card, direct debit, and bank transfer, " <> "with dunning that recovers and a ledger that never loses a kobo." end defp package do [ name: "nombaone", licenses: ["MIT"], maintainers: ["Nomba One"], links: %{ "GitHub" => @source_url, "Docs" => "https://docs.nombaone.xyz" }, files: ~w(lib .formatter.exs mix.exs README.md LICENSE CHANGELOG.md) ] end defp docs do [ main: "readme", extras: ["README.md", "CHANGELOG.md"], source_ref: "v#{@version}", formatters: ["html"], groups_for_modules: [ Client: [Nombaone, Nombaone.Client, Nombaone.Response], Resources: [ Nombaone.Customers, Nombaone.Plans, Nombaone.Plans.Prices, Nombaone.Prices, Nombaone.Subscriptions, Nombaone.Subscriptions.Schedule, Nombaone.Subscriptions.Dunning, Nombaone.Invoices, Nombaone.Coupons, Nombaone.PaymentMethods, Nombaone.Mandates, Nombaone.Settlements, Nombaone.WebhookEndpoints, Nombaone.WebhookEndpoints.Deliveries, Nombaone.Events, Nombaone.Organization, Nombaone.Organization.Billing, Nombaone.Metrics, Nombaone.Sandbox ], Pagination: [Nombaone.Page, Nombaone.Pagination], Errors: [ Nombaone.Error, ~r/Nombaone\.\w*Error$/ ], Webhooks: [Nombaone.Webhooks, Nombaone.WebhookEvent, Nombaone.WebhookEvent.Ref], Transport: [Nombaone.Transport, Nombaone.Transport.HTTPC], "Resource objects": [~r/Nombaone\./] ] ] end end