String compilerPath = Joiner.on(File.pathSeparator).join(invocation.getPath());
compilerPath = compilerPath + File.pathSeparator + System.getenv(pathVar);
compiler.environment(pathVar, compilerPath);
}
compiler.environment(invocation.getEnvironment());
try {
compiler.execute();
} catch (ExecException e) {
throw new GradleException(String.format("%s failed; see the error output for details.", action), e);