本文整理汇总了Java中org.gradle.initialization.BuildLayoutParameters.getGradleUserHomeDir方法的典型用法代码示例。如果您正苦于以下问题:Java BuildLayoutParameters.getGradleUserHomeDir方法的具体用法?Java BuildLayoutParameters.getGradleUserHomeDir怎么用?Java BuildLayoutParameters.getGradleUserHomeDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gradle.initialization.BuildLayoutParameters
的用法示例。
在下文中一共展示了BuildLayoutParameters.getGradleUserHomeDir方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: StartParameter
import org.gradle.initialization.BuildLayoutParameters; //导入方法依赖的package包/类
/**
* Creates a {@code StartParameter} with default values. This is roughly equivalent to running Gradle on the command-line with no arguments.
*/
public StartParameter() {
GradleInstallation gradleInstallation = CurrentGradleInstallation.get();
if (gradleInstallation == null) {
gradleHomeDir = null;
} else {
gradleHomeDir = gradleInstallation.getGradleHome();
}
BuildLayoutParameters layoutParameters = new BuildLayoutParameters();
searchUpwards = layoutParameters.getSearchUpwards();
currentDir = layoutParameters.getCurrentDir();
projectDir = layoutParameters.getProjectDir();
gradleUserHomeDir = layoutParameters.getGradleUserHomeDir();
maxWorkerCount = Runtime.getRuntime().availableProcessors();
}
示例2: initParams
import org.gradle.initialization.BuildLayoutParameters; //导入方法依赖的package包/类
private Parameters initParams(ProviderOperationParameters operationParameters) {
BuildLayoutParameters layout = new BuildLayoutParameters();
if (operationParameters.getGradleUserHomeDir() != null) {
layout.setGradleUserHomeDir(operationParameters.getGradleUserHomeDir());
}
layout.setSearchUpwards(operationParameters.isSearchUpwards() != null ? operationParameters.isSearchUpwards() : true);
layout.setProjectDir(operationParameters.getProjectDir());
Map<String, String> properties = new HashMap<String, String>();
new LayoutToPropertiesConverter().convert(layout, properties);
DaemonParameters daemonParams = new DaemonParameters(layout);
new PropertiesToDaemonParametersConverter().convert(properties, daemonParams);
if (operationParameters.getDaemonBaseDir(null) != null) {
daemonParams.setBaseDir(operationParameters.getDaemonBaseDir(null));
}
//override the params with the explicit settings provided by the tooling api
List<String> jvmArguments = operationParameters.getJvmArguments();
if (jvmArguments != null) {
daemonParams.setJvmArgs(jvmArguments);
}
File javaHome = operationParameters.getJavaHome();
if (javaHome != null) {
daemonParams.setJvm(Jvm.forHome(javaHome));
}
daemonParams.applyDefaultsFor(jvmVersionDetector.getJavaVersion(daemonParams.getEffectiveJvm()));
if (operationParameters.getDaemonMaxIdleTimeValue() != null && operationParameters.getDaemonMaxIdleTimeUnits() != null) {
int idleTimeout = (int) operationParameters.getDaemonMaxIdleTimeUnits().toMillis(operationParameters.getDaemonMaxIdleTimeValue());
daemonParams.setIdleTimeout(idleTimeout);
}
return new Parameters(daemonParams, properties, layout.getGradleUserHomeDir());
}
示例3: StartParameter
import org.gradle.initialization.BuildLayoutParameters; //导入方法依赖的package包/类
/**
* Creates a {@code StartParameter} with default values. This is roughly equivalent to running Gradle on the command-line with no arguments.
*/
public StartParameter() {
gradleHomeDir = new DefaultModuleRegistry().getGradleHome();
BuildLayoutParameters layoutParameters = new BuildLayoutParameters();
searchUpwards = layoutParameters.getSearchUpwards();
currentDir = layoutParameters.getCurrentDir();
projectDir = layoutParameters.getProjectDir();
gradleUserHomeDir = layoutParameters.getGradleUserHomeDir();
}
示例4: StartParameter
import org.gradle.initialization.BuildLayoutParameters; //导入方法依赖的package包/类
/**
* Creates a {@code StartParameter} with default values. This is roughly equivalent to running Gradle on the command-line with no arguments.
*/
public StartParameter() {
gradleHomeDir = new DefaultModuleRegistry().getGradleHome();
BuildLayoutParameters layoutDefaults = new BuildLayoutParameters();
searchUpwards = layoutDefaults.getSearchUpwards();
currentDir = layoutDefaults.getProjectDir();
gradleUserHomeDir = layoutDefaults.getGradleUserHomeDir();
}
示例5: DaemonParameters
import org.gradle.initialization.BuildLayoutParameters; //导入方法依赖的package包/类
public DaemonParameters(BuildLayoutParameters layout, Map<String, String> extraSystemProperties) {
jvmOptions.systemProperties(extraSystemProperties);
baseDir = new File(layout.getGradleUserHomeDir(), "daemon");
gradleUserHomeDir = layout.getGradleUserHomeDir();
}
示例6: DaemonParameters
import org.gradle.initialization.BuildLayoutParameters; //导入方法依赖的package包/类
public DaemonParameters(BuildLayoutParameters layout, Map<String, String> extraSystemProperties) {
this.uid = UUID.randomUUID().toString();
jvmOptions.setAllJvmArgs(DEFAULT_JVM_ARGS);
jvmOptions.systemProperties(extraSystemProperties);
baseDir = new File(layout.getGradleUserHomeDir(), "daemon");
}
示例7: DaemonParameters
import org.gradle.initialization.BuildLayoutParameters; //导入方法依赖的package包/类
public DaemonParameters(BuildLayoutParameters layout) {
this.uid = UUID.randomUUID().toString();
jvmOptions.setAllJvmArgs(getDefaultJvmArgs());
baseDir = new File(layout.getGradleUserHomeDir(), "daemon");
}