本文整理匯總了Java中org.gradle.api.UnknownProjectException類的典型用法代碼示例。如果您正苦於以下問題:Java UnknownProjectException類的具體用法?Java UnknownProjectException怎麽用?Java UnknownProjectException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
UnknownProjectException類屬於org.gradle.api包,在下文中一共展示了UnknownProjectException類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ensureConfigured
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
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);
}
}
}
}
示例2: resolveProjectModel
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
@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();
}
示例3: doResolve
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
@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);
}
}
示例4: project
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
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;
}
示例5: createPluginResolutionServiceResolver
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
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());
}
});
}
示例6: project
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
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;
}
示例7: getProject
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
@Override
public ProjectInternal getProject(String path) {
throw new UnknownProjectException(exceptionMessage);
}
示例8: getProject
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
public ProjectInternal getProject(String path) {
throw new UnknownProjectException("Cannot use project dependencies in a script classpath definition.");
}
示例9: getProject
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
public ProjectInternal getProject(String path) {
throw new UnknownProjectException("Cannot use project dependencies in a plugin resolution definition.");
}
示例10: project
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
/**
* <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;
示例11: resolveProjectModel
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
ModelRegistry resolveProjectModel(String path) throws UnknownProjectException;
示例12: project
import org.gradle.api.UnknownProjectException; //導入依賴的package包/類
ProjectInternal project(String path) throws UnknownProjectException;