-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmix.exs
102 lines (88 loc) · 2.28 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
90
91
92
93
94
95
96
97
98
99
100
101
102
defmodule JSON.LD.Mixfile do
use Mix.Project
@repo_url "https://github.com/rdf-elixir/jsonld-ex"
@version File.read!("VERSION") |> String.trim()
def project do
[
app: :json_ld,
version: @version,
elixir: "~> 1.15",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
aliases: aliases(),
# Hex
package: package(),
description: description(),
# Docs
name: "JSON-LD.ex",
docs: [
main: "JSON.LD",
source_url: @repo_url,
source_ref: "v#{@version}",
extras: ["README.md", "CHANGELOG.md"]
],
# Dialyzer
dialyzer: dialyzer(),
# ExCoveralls
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
check: :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
]
end
defp description do
"""
An implementation of JSON-LD for Elixir and RDF.ex.
"""
end
defp package do
[
maintainers: ["Marcel Otto"],
licenses: ["MIT"],
links: %{"GitHub" => @repo_url},
files: ~w[lib mix.exs README.md LICENSE.md VERSION]
]
end
def application do
[extra_applications: [:logger]]
end
defp deps do
[
# TODO: Change back to hex version once v2.1 is released
{:rdf, github: "rdf-elixir/rdf-ex"},
{:jason, "~> 1.2"},
{:httpoison, "~> 1.6 or ~> 2.0"},
{:castore, "~> 1.0", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.2", only: :dev, runtime: false},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:bypass, "~> 2.1", only: :test},
{:excoveralls, "~> 0.15", only: :test}
]
end
defp dialyzer do
[
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
]
end
defp aliases do
[
check: [
"clean",
"deps.unlock --check-unused",
"compile --warnings-as-errors",
"format --check-formatted",
"test --warnings-as-errors",
"credo"
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end