-
Notifications
You must be signed in to change notification settings - Fork 16
/
mix.exs
93 lines (79 loc) · 2.09 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
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.13",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
# 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: [
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
[
rdf_ex_dep(:rdf, "~> 1.0 or ~> 2.0"),
{: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 rdf_ex_dep(dep, version) do
case System.get_env("RDF_EX_PACKAGES_SRC") do
"LOCAL" -> {dep, path: "../#{dep}"}
_ -> {dep, version}
end
end
defp dialyzer do
[
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end