Java 类org.gradle.api.UnknownProjectException 实例源码

项目:intellij-ce-playground    文件:DependencyManager.java   
private void ensureConfigured(Configuration config) {
    for (Dependency dependency : config.getAllDependencies()) {
        if (dependency instanceof ProjectDependency) {
            ProjectDependency projectDependency = (ProjectDependency) dependency;
            project.evaluationDependsOn(projectDependency.getDependencyProject().getPath());
            try {
                ensureConfigured(projectDependency.getProjectConfiguration());
            } catch (Throwable e) {
                throw new UnknownProjectException(String.format(
                        "Cannot evaluate module %s : %s",
                        projectDependency.getName(), e.getMessage()),
                        e);
            }
        }
    }
}
项目:Reer    文件:DefaultProjectModelResolver.java   
@Override
public ModelRegistry resolveProjectModel(String path) {
    ProjectInternal projectInternal = delegate.getProject(path);
    if (projectInternal == null) {
        throw new UnknownProjectException("Project with path '" + path + "' not found.");
    }

    // TODO This is a brain-dead way to ensure that the reference project's model is ready to access
    projectInternal.evaluate();
    projectInternal.getTasks().discoverTasks();
    return projectInternal.getModelRegistry();
}
项目:Reer    文件:LocalLibraryDependencyResolver.java   
@Nullable
private LibraryResolutionResult doResolve(String selectorProjectPath, String libraryName) {
    try {
        ModelRegistry projectModel = projectModelResolver.resolveProjectModel(selectorProjectPath);
        Collection<VariantComponent> candidates = libraryResolver.resolveCandidates(projectModel, libraryName);
        if (candidates.isEmpty()) {
            return LibraryResolutionResult.emptyResolutionResult(binaryType);
        }
        return LibraryResolutionResult.of(binaryType, candidates, libraryName, binaryPredicate);
    } catch (UnknownProjectException e) {
        return LibraryResolutionResult.projectNotFound(binaryType);
    }
}
项目:Reer    文件:DefaultSettings.java   
public DefaultProjectDescriptor project(String path) {
    DefaultProjectDescriptor projectDescriptor = getProjectDescriptorRegistry().getProject(path);
    if (projectDescriptor == null) {
        throw new UnknownProjectException(String.format("Project with path '%s' could not be found.", path));
    }
    return projectDescriptor;
}
项目:Reer    文件:DefaultSettings.java   
public DefaultProjectDescriptor project(File projectDir) {
    DefaultProjectDescriptor projectDescriptor = getProjectDescriptorRegistry().getProject(projectDir);
    if (projectDescriptor == null) {
        throw new UnknownProjectException(String.format("Project with path '%s' could not be found.", projectDir));
    }
    return projectDescriptor;
}
项目:Pushjet-Android    文件:PluginUsePluginServiceRegistry.java   
PluginResolutionServiceResolver createPluginResolutionServiceResolver(PluginResolutionServiceClient pluginResolutionServiceClient, Instantiator instantiator, VersionMatcher versionMatcher, StartParameter startParameter, final DependencyManagementServices dependencyManagementServices, final FileResolver fileResolver, final DependencyMetaDataProvider dependencyMetaDataProvider, ClassLoaderScopeRegistry classLoaderScopeRegistry) {
    final ProjectFinder projectFinder = new ProjectFinder() {
        public ProjectInternal getProject(String path) {
            throw new UnknownProjectException("Cannot use project dependencies in a plugin resolution definition.");
        }
    };

    return new PluginResolutionServiceResolver(pluginResolutionServiceClient, instantiator, versionMatcher, startParameter, classLoaderScopeRegistry.getCoreScope(), new Factory<DependencyResolutionServices>() {
        public DependencyResolutionServices create() {
            return dependencyManagementServices.create(fileResolver, dependencyMetaDataProvider, projectFinder, new BasicDomainObjectContext());
        }
    });
}
项目:Pushjet-Android    文件:BaseSettings.java   
public DefaultProjectDescriptor project(String path) {
    DefaultProjectDescriptor projectDescriptor = projectDescriptorRegistry.getProject(path);
    if (projectDescriptor == null) {
        throw new UnknownProjectException(String.format("Project with path '%s' could not be found.", path));
    }
    return projectDescriptor;
}
项目:Pushjet-Android    文件:BaseSettings.java   
public DefaultProjectDescriptor project(File projectDir) {
    DefaultProjectDescriptor projectDescriptor = projectDescriptorRegistry.getProject(projectDir);
    if (projectDescriptor == null) {
        throw new UnknownProjectException(String.format("Project with path '%s' could not be found.", projectDir));
    }
    return projectDescriptor;
}
项目:Pushjet-Android    文件:BaseSettings.java   
public DefaultProjectDescriptor project(String path) {
    DefaultProjectDescriptor projectDescriptor = projectDescriptorRegistry.getProject(path);
    if (projectDescriptor == null) {
        throw new UnknownProjectException(String.format("Project with path '%s' could not be found.", path));
    }
    return projectDescriptor;
}
项目:Pushjet-Android    文件:BaseSettings.java   
public DefaultProjectDescriptor project(File projectDir) {
    DefaultProjectDescriptor projectDescriptor = projectDescriptorRegistry.getProject(projectDir);
    if (projectDescriptor == null) {
        throw new UnknownProjectException(String.format("Project with path '%s' could not be found.", projectDir));
    }
    return projectDescriptor;
}
项目:Reer    文件:UnknownProjectFinder.java   
@Override
public ProjectInternal getProject(String path) {
    throw new UnknownProjectException(exceptionMessage);
}
项目:Pushjet-Android    文件:DefaultScriptHandlerFactory.java   
public ProjectInternal getProject(String path) {
    throw new UnknownProjectException("Cannot use project dependencies in a script classpath definition.");
}
项目:Pushjet-Android    文件:PluginResolverFactory.java   
public ProjectInternal getProject(String path) {
    throw new UnknownProjectException("Cannot use project dependencies in a plugin resolution definition.");
}
项目:Pushjet-Android    文件:DefaultScriptHandlerFactory.java   
public ProjectInternal getProject(String path) {
    throw new UnknownProjectException("Cannot use project dependencies in a script classpath definition.");
}
项目:Reer    文件:Settings.java   
/**
 * <p>Returns the project with the given path.</p>
 *
 * @param path The path.
 * @return The project with the given path. Never returns null.
 * @throws UnknownProjectException If no project with the given path exists.
 */
ProjectDescriptor project(String path) throws UnknownProjectException;
项目:Reer    文件:Settings.java   
/**
 * <p>Returns the project with the given project directory.</p>
 *
 * @param projectDir The project directory.
 * @return The project with the given project directory. Never returns null.
 * @throws UnknownProjectException If no project with the given path exists.
 */
ProjectDescriptor project(File projectDir) throws UnknownProjectException;
项目:Pushjet-Android    文件:Settings.java   
/**
 * <p>Returns the project with the given path.</p>
 *
 * @param path The path.
 * @return The project with the given path. Never returns null.
 * @throws UnknownProjectException If no project with the given path exists.
 */
ProjectDescriptor project(String path) throws UnknownProjectException;
项目:Pushjet-Android    文件:Settings.java   
/**
 * <p>Returns the project with the given project directory.</p>
 *
 * @param projectDir The project directory.
 * @return The project with the given project directory. Never returns null.
 * @throws UnknownProjectException If no project with the given path exists.
 */
ProjectDescriptor project(File projectDir) throws UnknownProjectException;
项目:Pushjet-Android    文件:Settings.java   
/**
 * <p>Returns the project with the given path.</p>
 *
 * @param path The path.
 * @return The project with the given path. Never returns null.
 * @throws UnknownProjectException If no project with the given path exists.
 */
ProjectDescriptor project(String path) throws UnknownProjectException;
项目:Pushjet-Android    文件:Settings.java   
/**
 * <p>Returns the project with the given project directory.</p>
 *
 * @param projectDir The project directory.
 * @return The project with the given project directory. Never returns null.
 * @throws UnknownProjectException If no project with the given path exists.
 */
ProjectDescriptor project(File projectDir) throws UnknownProjectException;
项目:Reer    文件:ProjectModelResolver.java   
ModelRegistry resolveProjectModel(String path) throws UnknownProjectException;
项目:Reer    文件:ProjectInternal.java   
ProjectInternal project(String path) throws UnknownProjectException;
项目:Pushjet-Android    文件:ProjectInternal.java   
ProjectInternal project(String path) throws UnknownProjectException;
项目:Pushjet-Android    文件:ProjectInternal.java   
ProjectInternal project(String path) throws UnknownProjectException;