-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
89 lines (79 loc) · 1.8 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
83
84
85
86
87
88
89
defmodule ArchiveChallenges.MixProject do
@moduledoc false
use Mix.Project
@version "0.4.8"
@repo "https://github.com/skwerlman/lib_judge"
def project do
[
app: :lib_judge,
description: "Programmatic access to the MTG Comprehensive Rules",
version: @version,
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: dialyzer(),
docs: docs(),
package: package(),
source_url: @repo,
homepage_url: @repo
]
end
def application do
[
extra_applications: [:logger],
mod: {LibJudge, []}
]
end
defp deps do
[
{:finch, "~> 0.10"},
{:floki, "~> 0.32"},
{:propcheck, "~> 1.4", only: :test},
{:stream_data, "~> 0.6", only: :test},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
]
end
defp docs do
[
main: "readme",
source_url: @repo,
extras: [
"README.md": [title: "README"]
]
]
end
defp package do
[
files: ~w(lib .formatter.exs mix.exs README.md LICENSE),
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @repo
}
]
end
defp dialyzer do
plt =
case Mix.env() do
# this fixes a failure when dialyxir is run in a test env
:test ->
[:ex_unit]
_ ->
[]
end
[
plt_add_apps: plt,
flags: [
:unmatched_returns,
:error_handling,
:no_opaque,
:underspecs
]
]
end
# include models for property tests
defp elixirc_paths(:test), do: ["lib", "test/models"]
defp elixirc_paths(_), do: ["lib"]
end