Ejemplo n.º 1
0
 public void resolve(DependencyMetaData dependency, BuildableModuleVersionResolveResult result) {
   DependencyDescriptor descriptor = dependency.getDescriptor();
   if (descriptor instanceof ProjectDependencyDescriptor) {
     ProjectDependencyDescriptor desc = (ProjectDependencyDescriptor) descriptor;
     LocalComponentMetaData componentMetaData = projectModuleRegistry.findProject(desc);
     result.resolved(
         componentMetaData.toResolveMetaData(), new ProjectArtifactResolver(componentMetaData));
   } else {
     resolver.resolve(dependency, result);
   }
 }
  public void resolve(DependencyMetaData dependency, BuildableModuleVersionResolveResult result) {
    resolver.resolve(dependency, result);

    DependencyDescriptor descriptor = dependency.getDescriptor();
    if (result.getFailure() != null || !(descriptor instanceof ClientModuleDependencyDescriptor)) {
      return;
    }

    ClientModuleDependencyDescriptor clientModuleDependencyDescriptor =
        (ClientModuleDependencyDescriptor) descriptor;
    ModuleDescriptor moduleDescriptor = clientModuleDependencyDescriptor.getTargetModule();

    result.setMetaData(moduleDescriptor);
  }