Ejemplo n.º 1
0
  @Override
  public String getDescription(ExecutionContext context) {
    ImmutableList.Builder<String> args = ImmutableList.builder();
    args.add("unzip");

    Verbosity verbosity = context.getVerbosity();
    if (!verbosity.shouldUseVerbosityFlagIfAvailable()) {
      if (verbosity.shouldPrintStandardInformation()) {
        args.add("-q");
      } else {
        args.add("-qq");
      }
    }

    // overwrite existing files without prompting
    if (overwriteExistingFiles) {
      args.add("-o");
    }

    // output directory
    args.add("-d").add(pathToDestinationDirectory);

    // file to unzip
    args.add(pathToZipFile);

    // specific files within the archive to unzip -- if empty, extract all
    args.addAll(filesToExtract);

    return Joiner.on(" ").join(args.build());
  }
Ejemplo n.º 2
0
 @Override
 protected boolean shouldPrintStderr(Verbosity verbosity) {
   return verbosity.shouldPrintStandardInformation();
 }
Ejemplo n.º 3
0
 // The ndk-build command delegates to `make` to run a lot of subcommands, so print them as they
 // happen.
 @Override
 protected boolean shouldFlushStdOutErrAsProgressIsMade(Verbosity verbosity) {
   return verbosity.shouldPrintCommand();
 }