summaryrefslogtreecommitdiff
path: root/src/rebar_digraph.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_digraph.erl')
-rw-r--r--src/rebar_digraph.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rebar_digraph.erl b/src/rebar_digraph.erl
index 9e10d49..d52a811 100644
--- a/src/rebar_digraph.erl
+++ b/src/rebar_digraph.erl
@@ -124,6 +124,10 @@ find_app_by_name(Name, Apps) ->
rebar_app_info:name(App) =:= Name
end, Apps).
+%% The union of all entries in the applications list for an app and
+%% the deps listed in its rebar.config is all deps that may be needed
+%% for building the app.
all_apps_deps(App) ->
- Applications = [atom_to_binary(X, utf8) || X <- rebar_app_info:applications(App)],
- lists:usort(rebar_app_info:deps(App) ++ Applications).
+ Applications = lists:usort([atom_to_binary(X, utf8) || X <- rebar_app_info:applications(App)]),
+ Deps = lists:usort(lists:map(fun({Name, _}) -> Name; (Name) -> Name end, rebar_app_info:deps(App))),
+ lists:umerge(Deps, Applications).