Code example for Function

Methods: apply

0
  protected void addEnvironmentVariables( 
      ExecutionContext context,
      ImmutableMap.Builder<String, String> environmentVariablesBuilder) {
    super.addEnvironmentVariables(context, environmentVariablesBuilder);
    // We have to use an absolute path, because genrules are run in a temp directory. 
    String apkAbsolutePath = relativeToAbsolutePathFunction.apply(apk.getApkPath()).toString();
    environmentVariablesBuilder.put("APK", apkAbsolutePath);
  } 
}