summaryrefslogtreecommitdiff
path: root/src/rebar_plugins.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_plugins.erl')
-rw-r--r--src/rebar_plugins.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl
index 3c33498..68ba6da 100644
--- a/src/rebar_plugins.erl
+++ b/src/rebar_plugins.erl
@@ -3,7 +3,8 @@
-module(rebar_plugins).
--export([top_level_install/1
+-export([project_plugins_install/1
+ ,top_level_install/1
,project_apps_install/1
,install/2
,handle_plugins/3
@@ -15,6 +16,16 @@
%% Public API
%% ===================================================================
+-spec project_plugins_install(rebar_state:t()) -> rebar_state:t().
+project_plugins_install(State) ->
+ Profiles = rebar_state:current_profiles(State),
+ State1 = rebar_state:allow_provider_overrides(State, true),
+ State2 = lists:foldl(fun(Profile, StateAcc) ->
+ Plugins = rebar_state:get(State, {project_plugins, Profile}, []),
+ handle_plugins(Profile, Plugins, StateAcc)
+ end, State1, Profiles),
+ rebar_state:allow_provider_overrides(State2, false).
+
-spec top_level_install(rebar_state:t()) -> rebar_state:t().
top_level_install(State) ->
Profiles = rebar_state:current_profiles(State),