use of com.google.devtools.build.lib.runtime.BlazeRuntime in project bazel by bazelbuild.
the class MobileInstallCommand method exec.
@Override
public ExitCode exec(CommandEnvironment env, OptionsProvider options) {
BlazeRuntime runtime = env.getRuntime();
Options mobileInstallOptions = options.getOptions(Options.class);
WriteAdbArgsAction.Options adbOptions = options.getOptions(WriteAdbArgsAction.Options.class);
if (adbOptions.start == StartType.WARM && !mobileInstallOptions.incremental) {
env.getReporter().handle(Event.warn("Warm start is enabled, but will have no effect on a non-incremental build"));
}
List<String> targets = ProjectFileSupport.getTargets(runtime, options);
BuildRequest request = BuildRequest.create(this.getClass().getAnnotation(Command.class).name(), options, runtime.getStartupOptionsProvider(), targets, env.getReporter().getOutErr(), env.getCommandId(), env.getCommandStartTime());
return new BuildTool(env).processRequest(request, null).getExitCondition();
}
Aggregations