-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmix.exs
More file actions
94 lines (86 loc) · 2.42 KB
/
mix.exs
File metadata and controls
94 lines (86 loc) · 2.42 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
# credo:disable-for-this-file Credo.Check.Readability.Specs
defmodule Purl.MixProject do
use Mix.Project
{:ok, [{:application, :purl, props}]} = :file.consult(~c"src/purl.app.src")
@props Keyword.take(props, [:applications, :description, :env, :mod, :licenses, :vsn])
@source_url "https://github.com/erlef/purl"
def project do
[
app: :purl,
version: to_string(@props[:vsn]),
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
test_coverage: [tool: ExCoveralls],
description: to_string(@props[:description]),
dialyzer:
[list_unused_filters: true] ++
if (System.get_env("DIALYZER_PLT_PRIV") || "false") in ["1", "true"] do
[plt_file: {:no_warn, "priv/plts/dialyzer.plt"}]
else
[]
end,
package: package()
]
end
defp package do
%{
licenses: Enum.map(@props[:licenses], &to_string/1),
maintainers: ["Jonatan Männchen"],
links: %{
"GitHub" => @source_url,
"Changelog" => @source_url <> "/releases",
"Issues" => @source_url <> "/issues",
"purl Specification" => "https://github.com/package-url/purl-spec"
},
build_tools: ["rebar3", "mix"],
files: [
"include",
"lib",
"LICENSE*",
"mix.exs",
"README*",
"rebar.config",
"src",
"priv/spec/*LICENSE",
"priv/spec/types"
]
}
end
def application do
[mod: {:purl, []}]
end
def cli do
[
preferred_envs: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
"coveralls.json": :test,
"coveralls.post": :test,
"coveralls.xml": :test
]
]
end
defp docs do
[
source_url: @source_url,
source_ref: "v" <> to_string(@props[:vsn]),
main: "readme",
extras: ["README.md"],
groups_for_modules: [Erlang: [~r/purl/], "Elixir": [~r/^Purl/]]
]
end
defp deps do
[
{:credo, "~> 1.0", only: [:dev], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
{:excoveralls, "~> 0.5", only: [:test], runtime: false},
{:ex_doc, ">= 0.0.0", only: [:dev], runtime: false},
{:jason, "~> 1.4", only: [:dev, :test]},
{:stream_data, "~> 1.1", optional: true},
{:styler, "~> 1.4", only: [:dev, :test], runtime: false}
]
end
end