本文整理匯總了Java中org.gradle.api.Project.getRootDir方法的典型用法代碼示例。如果您正苦於以下問題:Java Project.getRootDir方法的具體用法?Java Project.getRootDir怎麽用?Java Project.getRootDir使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.gradle.api.Project
的用法示例。
在下文中一共展示了Project.getRootDir方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildAll
import org.gradle.api.Project; //導入方法依賴的package包/類
@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);
}
示例2: convert
import org.gradle.api.Project; //導入方法依賴的package包/類
private BasicGradleProject convert(Project project, Map<Project, BasicGradleProject> convertedProjects) {
DefaultProjectIdentifier id = new DefaultProjectIdentifier(project.getRootDir(), project.getPath());
BasicGradleProject converted = new BasicGradleProject().setName(project.getName()).setProjectIdentifier(id);
converted.setProjectDirectory(project.getProjectDir());
if (project.getParent() != null) {
converted.setParent(convertedProjects.get(project.getParent()));
}
convertedProjects.put(project, converted);
for (Project child : project.getChildProjects().values()) {
converted.addChild(convert(child, convertedProjects));
}
return converted;
}
示例3: getProjectIdentifier
import org.gradle.api.Project; //導入方法依賴的package包/類
private DefaultProjectIdentifier getProjectIdentifier(Project project) {
return new DefaultProjectIdentifier(project.getRootDir(), project.getPath());
}
示例4: buildAll
import org.gradle.api.Project; //導入方法依賴的package包/類
@Override
public Object buildAll(String modelName, Project project) {
DefaultProjectIdentifier projectIdentifier = new DefaultProjectIdentifier(project.getRootDir(), project.getPath());
return new DefaultProjectPublications().setPublications(publications(projectIdentifier)).setProjectIdentifier(projectIdentifier);
}
示例5: getManager
import org.gradle.api.Project; //導入方法依賴的package包/類
private static LibrariesManager getManager(Project project) {
File dependenciesFile = new File(project.getRootDir(), "dependencies.json");
librariesManagers.putIfAbsent(project, new LibrariesManager(dependenciesFile));
return librariesManagers.get(project);
}