dev.gradleplugins.runnerkit.GradleUserHomeLookup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-runner-kit-wrapper-impl Show documentation
Show all versions of gradle-runner-kit-wrapper-impl Show documentation
Gradle runner kit implementation for Gradle wrapper executor.
package dev.gradleplugins.runnerkit;
import java.io.File;
final class GradleUserHomeLookup {
public static final String DEFAULT_GRADLE_USER_HOME = System.getProperty("user.home") + "/.gradle";
public static final String GRADLE_USER_HOME_PROPERTY_KEY = "gradle.user.home";
public static final String GRADLE_USER_HOME_ENV_KEY = "GRADLE_USER_HOME";
public static File gradleUserHome() {
String gradleUserHome;
if ((gradleUserHome = System.getProperty(GRADLE_USER_HOME_PROPERTY_KEY)) != null) {
return new File(gradleUserHome);
}
if ((gradleUserHome = System.getenv(GRADLE_USER_HOME_ENV_KEY)) != null) {
return new File(gradleUserHome);
}
return new File(DEFAULT_GRADLE_USER_HOME);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy