rdf-ex/mix.exs

114 lines
2.7 KiB
Elixir
Raw Normal View History

2017-06-11 15:23:58 +00:00
defmodule RDF.Mixfile do
2016-09-30 14:36:50 +00:00
use Mix.Project
@repo_url "https://github.com/rdf-elixir/rdf-ex"
2020-06-29 08:37:42 +00:00
@version File.read!("VERSION") |> String.trim()
2016-09-30 14:51:59 +00:00
2016-09-30 14:36:50 +00:00
def project do
2016-09-30 14:51:59 +00:00
[
2017-06-11 15:23:58 +00:00
app: :rdf,
2016-09-30 14:51:59 +00:00
version: @version,
elixir: "~> 1.10",
2020-06-29 08:37:42 +00:00
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
2020-06-29 08:37:42 +00:00
compilers: Mix.compilers() ++ [:protocol_ex],
aliases: aliases(),
2020-02-28 17:51:48 +00:00
# Dialyzer
dialyzer: dialyzer(),
# Hex
package: package(),
description: description(),
# Docs
name: "RDF.ex",
docs: [
main: "RDF",
source_url: @repo_url,
source_ref: "v#{@version}",
2020-06-29 08:37:42 +00:00
extras: ["CHANGELOG.md"]
2017-08-11 12:11:37 +00:00
],
# ExCoveralls
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
2018-08-10 21:49:22 +00:00
coveralls: :test,
2017-08-11 12:11:37 +00:00
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
earl_reports: :test
2020-06-29 08:37:42 +00:00
]
2016-09-30 14:51:59 +00:00
]
end
2017-06-11 12:29:17 +00:00
defp description do
"""
An implementation of RDF for Elixir.
"""
end
2016-09-30 14:51:59 +00:00
defp package do
[
maintainers: ["Marcel Otto"],
licenses: ["MIT"],
2019-04-06 00:24:22 +00:00
links: %{
"Homepage" => "https://rdf-elixir.dev",
"GitHub" => @repo_url,
2020-06-29 08:37:42 +00:00
"Changelog" => @repo_url <> "/blob/master/CHANGELOG.md"
2019-04-06 00:24:22 +00:00
},
2019-09-23 18:20:19 +00:00
files: ~w[lib src/*.xrl src/*.yrl priv mix.exs .formatter.exs VERSION *.md]
2016-09-30 14:51:59 +00:00
]
2016-09-30 14:36:50 +00:00
end
def application do
2017-06-25 19:15:55 +00:00
[extra_applications: [:logger]]
2016-09-30 14:36:50 +00:00
end
defp deps do
2016-09-30 14:54:47 +00:00
[
2018-06-15 19:19:22 +00:00
{:decimal, "~> 1.5"},
{:protocol_ex, "~> 0.4.4"},
2022-03-02 00:55:31 +00:00
{:elixir_uuid, "~> 1.2", optional: true},
2021-12-13 10:43:07 +00:00
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
2021-03-18 20:55:10 +00:00
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
2022-03-21 23:57:30 +00:00
{:ex_doc, "~> 0.28", only: :dev, runtime: false},
2021-03-01 22:10:41 +00:00
{:excoveralls, "~> 0.14", only: :test},
2022-03-21 23:57:30 +00:00
{:benchee, "~> 1.1", only: :bench}
2016-09-30 14:54:47 +00:00
]
2016-09-30 14:36:50 +00:00
end
2020-02-28 17:51:48 +00:00
defp dialyzer do
[
plt_add_apps: [:mix],
2020-03-19 21:04:17 +00:00
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
ignore_warnings: ".dialyzer_ignore"
2020-02-28 17:51:48 +00:00
]
end
defp aliases do
[
earl_reports: &earl_reports/1
]
end
defp earl_reports(_) do
files = [
"test/acceptance/ntriples_w3c_test.exs",
"test/acceptance/ntriples_star_w3c_test.exs",
"test/acceptance/nquads_w3c_test.exs",
"test/acceptance/turtle_w3c_test.exs",
"test/acceptance/turtle_star_w3c_syntax_test.exs",
"test/acceptance/turtle_star_w3c_eval_test.exs"
]
Mix.Task.run("test", ["--formatter", "EarlFormatter", "--seed", "0"] ++ files)
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
2020-06-29 08:37:42 +00:00
defp elixirc_paths(_), do: ["lib"]
2016-09-30 14:36:50 +00:00
end