public void selectTasks(GradleInternal gradle, String path) {
SetMultimap<String, Task> tasksByName;
String baseName;
String prefix;
ProjectInternal project = gradle.getDefaultProject();
if (path.contains(Project.PATH_SEPARATOR)) {
String projectPath = StringUtils.substringBeforeLast(path, Project.PATH_SEPARATOR);
projectPath = projectPath.length() == 0 ? Project.PATH_SEPARATOR : projectPath;
project = findProject(project, projectPath);
baseName = StringUtils.substringAfterLast(path, Project.PATH_SEPARATOR);
prefix = project.getPath() + Project.PATH_SEPARATOR;
tasksByName = taskNameResolver.select(baseName, project);
}
else {
baseName = path;