aboutsummaryrefslogtreecommitdiff
path: root/rebar.config.script
diff options
context:
space:
mode:
Diffstat (limited to 'rebar.config.script')
-rw-r--r--rebar.config.script12
1 files changed, 11 insertions, 1 deletions
diff --git a/rebar.config.script b/rebar.config.script
index 30d479eab..64398f33e 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -95,6 +95,9 @@ CfgDeps = lists:flatmap(
{tag, "1.4.2"}}}];
({json, true}) ->
[{jiffy, ".*", {git, "git://github.com/davisp/jiffy"}}];
+ ({elixir, true}) ->
+ [{rebar_elixir_plugin, ".*", {git, "git://github.com/yrashk/rebar_elixir_plugin"}},
+ {elixir, "1.1.*", {git, "git://github.com/elixir-lang/elixir"}}];
({iconv, true}) ->
[{p1_iconv, ".*", {git, "git://github.com/processone/eiconv"}}];
({lager, true}) ->
@@ -142,6 +145,13 @@ CfgXrefs = lists:flatmap(
[]
end, Cfg),
+ElixirConfig = case lists:keysearch(elixir, 1, Cfg) of
+ {value, {elixir, true}} ->
+ [{plugins, [rebar_elixir_compiler, rebar_exunit] },
+ {lib_dirs, ["deps/elixir/lib"]}];
+ _ ->
+ []
+ end,
{ok, Cwd} = file:get_cwd(),
@@ -157,7 +167,7 @@ Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
[{"(XC - UC) || (XU - X - B - "
++ string:join(CfgXrefs, " - ") ++ ")", []}]},
{post_hooks, PostHooks ++ CfgPostHooks},
- {deps, Deps ++ CfgDeps}],
+ {deps, Deps ++ CfgDeps}] ++ ElixirConfig,
%%io:format("ejabberd configuration:~n ~p~n", [Config]),
Config.