-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
mix.exs
82 lines (72 loc) · 2.18 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
defmodule Oidcc.Mixfile do
use Mix.Project
{:ok, [{:application, :oidcc, props}]} = :file.consult(~c"src/oidcc.app.src")
@props Keyword.take(props, [:applications, :description, :env, :mod, :licenses, :vsn])
def project() do
[
app: :oidcc,
version: to_string(@props[:vsn]),
elixir: ">= 1.14.4 and < 2.0.0",
erlc_options: erlc_options(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
name: "Oidcc",
source_url: "https://github.com/erlef/oidcc",
docs: &docs/0,
description: to_string(@props[:description]),
package: package(),
test_coverage: [ignore_modules: [Oidcc.RecordStruct]]
]
end
def application,
do: [
extra_applications: extra_applications(Mix.env())
]
defp extra_applications(env)
defp extra_applications(:dev), do: [:inets, :ssl, :edoc, :xmerl]
defp extra_applications(_env), do: [:inets, :ssl]
defp deps() do
[
{:telemetry, "~> 1.2"},
{:telemetry_registry, "~> 0.3.1"},
{:jose, "~> 1.11"},
{:jsx, "~> 3.1", only: :test},
{:mock, "~> 0.3.8", only: :test},
{:ex_doc, "~> 0.29", only: :dev, runtime: false},
{:credo, "~> 1.7", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: :dev, runtime: false}
]
end
defp erlc_options(:prod), do: []
defp erlc_options(_enc),
do: [:debug_info, :warn_unused_import, :warn_export_vars, :warnings_as_errors, :verbose]
defp package() do
[
maintainers: ["Jonatan Männchen"],
build_tools: ["rebar3", "mix"],
files: [
"include",
"lib",
"LICENSE*",
"mix.exs",
"README*",
"rebar.config",
"src"
],
licenses: Enum.map(@props[:licenses], &to_string/1),
links: %{"Github" => "https://github.com/erlef/oidcc"}
]
end
defp docs do
{ref, 0} = System.cmd("git", ["rev-parse", "--verify", "--quiet", "HEAD"])
[
source_ref: ref,
main: "readme",
extras: ["README.md"],
groups_for_modules: [Erlang: [~r/oidcc/], "Elixir": [~r/Oidcc/]],
logo: "assets/logo.svg",
assets: %{"assets" => "assets"}
]
end
end