import java.io.ByteArrayOutputStream;
import java.io.File;
public class Main {
public static void main(String[] args) {
GradleConnector connector = GradleConnector.newConnector();
<BUG>String gradleUserHomeDir = System.getProperty("gradle.user.home");
if (gradleUserHomeDir != null && gradleUserHomeDir.length() > 0) {
connector.useGradleUserHomeDir(new File(gradleUserHomeDir));

}</BUG>
connector.forProjectDirectory(new File("."));

import java.io.ByteArrayOutputStream;
import java.io.File;
public class Main {
public static void main(String[] args) {
GradleConnector connector = GradleConnector.newConnector();
if (args.length > 0) {
connector.useInstallation(new File(args[0]));
if (args.length > 1) {
connector.useGradleUserHomeDir(new File(args[1]));
}
}
