Java Code Examples for org.gradle.process.ExecSpec#environment()
The following examples show how to use
org.gradle.process.ExecSpec#environment() .
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: ExecCustomizer.java From curiostack with MIT License | 6 votes |
void copyTo(ExecSpec exec) { if (executable != null) { exec.executable(executable); } if (arguments != null) { exec.args(arguments); } if (environment != null) { exec.environment(environment); } if (ignoreExitValue != null) { exec.setIgnoreExitValue(ignoreExitValue); } if (workingDir != null) { exec.workingDir(workingDir); } if (standardInput != null) { exec.setStandardInput(standardInput); } if (standardOutput != null) { exec.setStandardOutput(standardOutput); } if (standardError != null) { exec.setErrorOutput(standardError); } }
Example 2
Source File: GradleProcessExecutor.java From javaide with GNU General Public License v3.0 | 5 votes |
@Override public void execute(ExecSpec execSpec) { execSpec.setExecutable(processInfo.getExecutable()); execSpec.args(processInfo.getArgs()); execSpec.environment(processInfo.getEnvironment()); execSpec.setStandardOutput(processOutput.getStandardOutput()); execSpec.setErrorOutput(processOutput.getErrorOutput()); // we want the caller to be able to do its own thing. execSpec.setIgnoreExitValue(true); }
Example 3
Source File: GoExecUtil.java From curiostack with MIT License | 5 votes |
public static void goExec(ExecSpec exec, Project project, String command, Iterable<String> args) { var toolManager = DownloadedToolManager.get(project); exec.executable(toolManager.getBinDir("go").resolve(command)); exec.args(args); exec.environment("GOROOT", toolManager.getToolDir("go").resolve("go")); exec.environment( "GOPATH", project.getExtensions().getByType(ExtraPropertiesExtension.class).get("gopath")); if (!"true" .equals(project.getRootProject().findProperty("org.curioswitch.curiostack.goModUpdate"))) { exec.environment("GOFLAGS", "-mod=readonly"); } toolManager.addAllToPath(exec); }