Allow easy switching of RDF.ex packages during development

This commit is contained in:
Marcel Otto 2022-03-17 23:22:51 +01:00
parent 99ff10f4e6
commit 0b23a620af

View file

@ -63,7 +63,7 @@ defmodule JSON.LD.Mixfile do
defp deps do
[
{:rdf, "~> 0.9"},
rdf_ex_dep(:rdf, "~> 0.9"),
{:jason, "~> 1.2"},
{:httpoison, "~> 1.6"},
{:dialyxir, "~> 1.1", only: :dev, runtime: false},
@ -73,6 +73,13 @@ defmodule JSON.LD.Mixfile do
]
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"}