/** @return The module version, or null if there is a failure to resolve this selector. */ public ModuleVersionResolveState resolveModuleRevisionId() { if (targetModuleRevision != null) { return targetModuleRevision; } if (failure != null) { return null; } idResolveResult = new DefaultBuildableComponentIdResolveResult(); resolver.resolve(dependencyMetaData, idResolveResult); if (idResolveResult.getFailure() != null) { failure = idResolveResult.getFailure(); return null; } targetModuleRevision = resolveState.getRevision(idResolveResult.getModuleVersionId()); targetModuleRevision.addResolver(this); targetModuleRevision.selectionReason = idResolveResult.getSelectionReason(); targetModule = targetModuleRevision.module; targetModule.addSelector(this); return targetModuleRevision; }
public ComponentSelectionReason getSelectionReason() { return targetModuleRevision == null ? idResolveResult.getSelectionReason() : targetModuleRevision.getSelectionReason(); }