anchor.diff:      } finally {
         tempDir.deleteSync(recursive: true);
       }
  +  }
  +
  +  int _signApk(_ApkBuilder builder, _ApkComponents components, File apk) {
  +    File keystore;
  +    String keystorePassword;
  +    String keyAlias;
  +    String keyPassword;
  +
  +    if (argResults['keystore'].isEmpty) {
  +      logging.warning('Signing the APK using the debug keystore');
  +      keystore = components.debugKeystore;
  +      keystorePassword = _kDebugKeystorePassword;
  +      keyAlias = _kDebugKeystoreKeyAlias;
  +      keyPassword = _kDebugKeystorePassword;
  +    } else {
  +      keystore = new File(argResults['keystore']);
  +      keystorePassword = argResults['keystore-password'];
  +      keyAlias = argResults['keystore-key-alias'];
  +      if (keystorePassword.isEmpty || keyAlias.isEmpty) {
  +        logging.severe('Must provide a keystore password and a key alias');
  +        return 1;
  +      }
  +      keyPassword = argResults['keystore-key-password'];
  +      if (keyPassword.isEmpty)
  +        keyPassword = keystorePassword;
  +    }
  +
  +    builder.sign(keystore, keystorePassword, keyAlias, keyPassword, apk);
  +
  +    return 0;
     }
   
     @override
  
positive.code:   File icuData;
    File classesDex;
    File libSkyShell;
    File keystore;
    Directory resources;
  }
  
  
negative.code: const String _kDefaultAndroidManifestPath = 'apk/AndroidManifest.xml';
  const String _kDefaultOutputPath = 'build/app.apk';
  const String _kDefaultResourcesPath = 'apk/res';
  
  // Alias of the key provided in the Chromium debug keystore
  const String _kDebugKeystoreKeyAlias = "chromiumdebugkey";
  
  // Password for the Chromium debug keystore
  const String _kDebugKeystorePassword = "chromium";
  
  const String _kAndroidPlatformVersion = '22';
  const String _kBuildToolsVersion = '22.0.1';
  