1defmodule Atex.MixProject do
2 use Mix.Project
3
4 @version "0.6.0"
5 @github "https://github.com/cometsh/atex"
6 @tangled "https://tangled.sh/@comet.sh/atex"
7
8 def project do
9 [
10 app: :atex,
11 version: @version,
12 elixir: "~> 1.18",
13 start_permanent: Mix.env() == :prod,
14 deps: deps(),
15 name: "atex",
16 description: "A set of utilities for working with the AT Protocol in Elixir.",
17 package: package(),
18 docs: docs()
19 ]
20 end
21
22 def application do
23 [
24 extra_applications: [:logger],
25 mod: {Atex.Application, []}
26 ]
27 end
28
29 defp deps do
30 [
31 {:peri, "~> 0.6"},
32 {:multiformats_ex, "~> 0.2"},
33 {:recase, "~> 0.5"},
34 {:req, "~> 0.5"},
35 {:typedstruct, "~> 0.5"},
36 {:ex_cldr, "~> 2.42"},
37 {:credo, "~> 1.7", only: [:dev, :test], runtime: false},
38 {:ex_doc, "~> 0.34", only: :dev, runtime: false, warn_if_outdated: true},
39 {:plug, "~> 1.18"},
40 {:jason, "~> 1.4"},
41 {:jose, "~> 1.11"},
42 {:bandit, "~> 1.0", only: [:dev, :test]}
43 ]
44 end
45
46 defp package do
47 [
48 licenses: ["MIT"],
49 links: %{"GitHub" => @github, "Tangled" => @tangled}
50 ]
51 end
52
53 defp docs do
54 [
55 extras: [
56 LICENSE: [title: "License"],
57 "README.md": [title: "Overview"],
58 "CHANGELOG.md": [title: "Changelog"]
59 ],
60 main: "readme",
61 source_url: @github,
62 source_ref: "v#{@version}",
63 formatters: ["html"],
64 groups_for_modules: [
65 "Data types": [Atex.AtURI, Atex.DID, Atex.Handle, Atex.NSID, Atex.TID],
66 XRPC: ~r/^Atex\.XRPC/,
67 OAuth: [Atex.Config.OAuth, Atex.OAuth, Atex.OAuth.Plug],
68 Lexicons: ~r/^Atex\.Lexicon/,
69 Identity: ~r/^Atex\.IdentityResolver/
70 ]
71 ]
72 end
73end