public GradleExecuter withEnvironmentVars(Map<String, ?> environment) { environmentVars.clear(); for (Map.Entry<String, ?> entry : environment.entrySet()) { if (entry.getKey().equals("GRADLE_OPTS")) { throw new IllegalArgumentException( "GRADLE_OPTS cannot be set via withEnvironmentVars(), use withGradleOpts()"); } environmentVars.put(entry.getKey(), entry.getValue().toString()); } return this; }
protected Map<String, String> getImplicitJvmSystemProperties() { Map<String, String> properties = new LinkedHashMap<String, String>(); if (getUserHomeDir() != null) { properties.put("user.home", getUserHomeDir().getAbsolutePath()); } properties.put(DaemonParameters.IDLE_TIMEOUT_SYS_PROPERTY, "" + (daemonIdleTimeoutSecs * 1000)); properties.put(DaemonParameters.BASE_DIR_SYS_PROPERTY, daemonBaseDir.getAbsolutePath()); properties.put(DeprecationLogger.ORG_GRADLE_DEPRECATION_TRACE_PROPERTY_NAME, "true"); properties.put("java.io.tmpdir", getTmpDir().createDir().getAbsolutePath()); return properties; }
public GradleExecuter reset() { args.clear(); tasks.clear(); initScripts.clear(); workingDir = null; projectDir = null; buildScript = null; settingsFile = null; quiet = false; taskList = false; dependencyList = false; searchUpwards = false; executable = null; javaHome = null; environmentVars.clear(); stdin = null; defaultCharacterEncoding = null; noDefaultJvmArgs = false; deprecationChecksOn = true; stackTraceChecksOn = true; return this; }