use of org.gradle.api.UnknownProjectException in project atlas by alibaba.
the class DependencyManager method ensureConfigured.
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);
}
}
}
}
use of org.gradle.api.UnknownProjectException in project gradle by gradle.
the class LocalLibraryDependencyResolver method doResolve.
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);
}
}
use of org.gradle.api.UnknownProjectException in project gradle by gradle.
the class DefaultProjectModelResolver method resolveProjectModel.
@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
return projectInternal.getOwner().fromMutableState(project -> {
project.prepareForRuleBasedPlugins();
project.evaluate();
project.getTasks().discoverTasks();
return project.getModelRegistry();
});
}
Aggregations