当前位置: 首页>>代码示例>>Java>>正文


Java BuildLayoutParameters.getGradleUserHomeDir方法代码示例

本文整理汇总了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();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:19,代码来源:StartParameter.java

示例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());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:36,代码来源:ProviderConnection.java

示例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();
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:13,代码来源:StartParameter.java

示例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();
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:12,代码来源:StartParameter.java

示例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();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:6,代码来源:DaemonParameters.java

示例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");
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:7,代码来源:DaemonParameters.java

示例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");
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:6,代码来源:DaemonParameters.java


注:本文中的org.gradle.initialization.BuildLayoutParameters.getGradleUserHomeDir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。