diff options
author | 2015-06-17 14:49:02 +0000 | |
---|---|---|
committer | 2015-06-17 15:25:09 +0000 | |
commit | 6fd6cec4c5b54989ea82b8e705f830af8a9de61c (patch) | |
tree | a83f4931c8702412c5404f99b8f2bcc714725c73 /src/main | |
parent | f257c677fb036c2bed55201990d640795ab4e598 (diff) |
Adds WriteAdbArgsActionContext to BazelRulesModule for the incremental_install tool for the mobile-install command.
--
MOS_MIGRATED_REVID=96205931
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java index cfe6589127..c5effa0bed 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java @@ -19,9 +19,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.eventbus.Subscribe; import com.google.devtools.build.lib.actions.ActionContextConsumer; +import com.google.devtools.build.lib.actions.ActionContextProvider; import com.google.devtools.build.lib.actions.Executor.ActionContext; +import com.google.devtools.build.lib.actions.SimpleActionContextProvider; import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider; import com.google.devtools.build.lib.query2.output.OutputFormatter; +import com.google.devtools.build.lib.rules.android.WriteAdbArgsActionContext; import com.google.devtools.build.lib.rules.cpp.CppCompileActionContext; import com.google.devtools.build.lib.rules.cpp.CppLinkActionContext; import com.google.devtools.build.lib.rules.genquery.GenQuery; @@ -110,7 +113,8 @@ public class BazelRulesModule extends BlazeModule { public Map<Class<? extends ActionContext>, String> getActionContexts() { return ImmutableMap.of( CppCompileActionContext.class, "", - CppLinkActionContext.class, ""); + CppLinkActionContext.class, "", + WriteAdbArgsActionContext.class, ""); } } @@ -131,6 +135,12 @@ public class BazelRulesModule extends BlazeModule { } @Override + public Iterable<ActionContextProvider> getActionContextProviders() { + return ImmutableList.<ActionContextProvider>of(new SimpleActionContextProvider( + new WriteAdbArgsActionContext(runtime.getClientEnv().get("HOME")))); + } + + @Override public Iterable<ActionContextConsumer> getActionContextConsumers() { return ImmutableList.<ActionContextConsumer>of(new BazelActionContextConsumer( optionsProvider.getOptions(BazelExecutionOptions.class))); |