Search in sources :

Example 1 with CurrentProcess

use of org.gradle.process.internal.CurrentProcess in project gradle by gradle.

the class BuildEnvironmentBuilder method buildAll.

@Override
public Object buildAll(String modelName, Project target) {
    File gradleUserHomeDir = target.getGradle().getGradleUserHomeDir();
    String gradleVersion = target.getGradle().getGradleVersion();
    CurrentProcess currentProcess = new CurrentProcess();
    File javaHome = currentProcess.getJvm().getJavaHome();
    List<String> jvmArgs = currentProcess.getJvmOptions().getAllImmutableJvmArgs();
    DefaultBuildIdentifier buildIdentifier = new DefaultBuildIdentifier(target.getRootDir());
    return new DefaultBuildEnvironment(buildIdentifier, gradleUserHomeDir, gradleVersion, javaHome, jvmArgs);
}
Also used : DefaultBuildEnvironment(org.gradle.tooling.internal.build.DefaultBuildEnvironment) DefaultBuildIdentifier(org.gradle.tooling.internal.gradle.DefaultBuildIdentifier) CurrentProcess(org.gradle.process.internal.CurrentProcess) File(java.io.File)

Aggregations

File (java.io.File)1 CurrentProcess (org.gradle.process.internal.CurrentProcess)1 DefaultBuildEnvironment (org.gradle.tooling.internal.build.DefaultBuildEnvironment)1 DefaultBuildIdentifier (org.gradle.tooling.internal.gradle.DefaultBuildIdentifier)1