Packages

Elixir SDK for the antd daemon — gateway to the Autonomi network

Current section

Files

Jump to
antd mix.exs
Raw

mix.exs

defmodule Antd.MixProject do
  use Mix.Project

  def project do
    [
      app: :antd,
      # The version of the daemon-client API, shared with the other antd clients.
      version: "0.4.2",
      elixir: "~> 1.15",
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      description: "Elixir SDK for the antd daemon — gateway to the Autonomi network",
      source_url: "https://gitlab.com/autonomi/ant-sdk/-/tree/main/antd-elixir",
      package: package(),
      docs: docs()
    ]
  end

  # What goes to Hex. `files` is the whole package: the tests, the examples and
  # the stub generator stay in the repository.
  defp package do
    [
      name: "antd",
      licenses: ["MIT", "Apache-2.0"],
      links: %{
        "Source" => "https://gitlab.com/autonomi/ant-sdk/-/tree/main/antd-elixir",
        "Autonomi" => "https://autonomi.com"
      },
      files: ~w(lib mix.exs README.md LICENSE-MIT LICENSE-APACHE .formatter.exs)
    ]
  end

  defp docs do
    [
      main: "readme",
      extras: ["README.md"]
    ]
  end

  def application do
    [
      extra_applications: [:logger]
    ]
  end

  defp deps do
    [
      {:req, "~> 0.4"},
      {:jason, "~> 1.4"},
      # grpc < 1.0 carries the advisories GHSA-grp7-v8xh-rj7h (critical) and
      # three more, all fixed in 1.0.0, and grpc_core 1.0.x carries
      # GHSA-xxp9-7hp4-rqwp, fixed in 1.1.0 (grpc 1.1 needs gun 2.7). From 1.0
      # the client is its own package
      # and gun is an optional dependency of it, so it is listed here.
      # Antd.GrpcAdapter copies from grpc's Gun adapter internals, so keep the
      # range to one minor line and re-run test/antd/grpc_pointers_test.exs
      # when moving it.
      {:grpc, "~> 1.1.0"},
      {:gun, "~> 2.7.0"},
      {:protobuf, "~> 0.12"},
      # Only the test suite's mock servers use the server half.
      {:grpc_server, "~> 1.1.0", only: :test},
      # hexdocs.pm pages, built when the package is published.
      {:ex_doc, "~> 0.34", only: :dev, runtime: false},
      {:bypass, "~> 2.1", only: :test}
    ]
  end
end