use of org.gradle.tooling.internal.gradle.GradleBuildIdentity in project gradle by gradle.
the class DefaultBuildController method getTargetProject.
private ProjectInternal getTargetProject(Object target) {
ProjectInternal project;
if (target == null) {
project = gradle.getDefaultProject();
} else if (target instanceof GradleProjectIdentity) {
GradleProjectIdentity projectIdentity = (GradleProjectIdentity) target;
GradleInternal build = findBuild(projectIdentity);
project = findProject(build, projectIdentity);
} else if (target instanceof GradleBuildIdentity) {
GradleBuildIdentity buildIdentity = (GradleBuildIdentity) target;
project = findBuild(buildIdentity).getDefaultProject();
} else {
throw new IllegalArgumentException("Don't know how to build models for " + target);
}
return project;
}
Aggregations