Java Code Examples for org.gradle.process.internal.ExecAction#setStandardOutput()
The following examples show how to use
org.gradle.process.internal.ExecAction#setStandardOutput() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GccVersionDeterminer.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
private String transform(File gccBinary, List<String> args) { ExecAction exec = execActionFactory.newExecAction(); exec.executable(gccBinary.getAbsolutePath()); exec.setWorkingDir(gccBinary.getParentFile()); exec.args(args); ByteArrayOutputStream baos = new ByteArrayOutputStream(); exec.setStandardOutput(baos); exec.setErrorOutput(new ByteArrayOutputStream()); exec.setIgnoreExitValue(true); ExecResult result = exec.execute(); int exitValue = result.getExitValue(); if (exitValue == 0) { return new String(baos.toByteArray()); } else { return null; } }
Example 2
Source File: GccVersionDeterminer.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public String transform(File gccBinary) { ExecAction exec = execActionFactory.newExecAction(); exec.executable(gccBinary.getAbsolutePath()); exec.setWorkingDir(gccBinary.getParentFile()); exec.args("-dM", "-E", "-"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); exec.setStandardOutput(baos); exec.setIgnoreExitValue(true); ExecResult result = exec.execute(); int exitValue = result.getExitValue(); if (exitValue == 0) { return new String(baos.toByteArray()); } else { return null; } }
Example 3
Source File: GccVersionDeterminer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
private String transform(File gccBinary, List<String> args) { ExecAction exec = execActionFactory.newExecAction(); exec.executable(gccBinary.getAbsolutePath()); exec.setWorkingDir(gccBinary.getParentFile()); exec.args(args); ByteArrayOutputStream baos = new ByteArrayOutputStream(); exec.setStandardOutput(baos); exec.setErrorOutput(new ByteArrayOutputStream()); exec.setIgnoreExitValue(true); ExecResult result = exec.execute(); int exitValue = result.getExitValue(); if (exitValue == 0) { return new String(baos.toByteArray()); } else { return null; } }
Example 4
Source File: GccVersionDeterminer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public String transform(File gccBinary) { ExecAction exec = execActionFactory.newExecAction(); exec.executable(gccBinary.getAbsolutePath()); exec.setWorkingDir(gccBinary.getParentFile()); exec.args("-dM", "-E", "-"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); exec.setStandardOutput(baos); exec.setIgnoreExitValue(true); ExecResult result = exec.execute(); int exitValue = result.getExitValue(); if (exitValue == 0) { return new String(baos.toByteArray()); } else { return null; } }