private ResolvedModuleRevision checkForcedResolvedModuleRevision(ResolvedModuleRevision rmr) { if (rmr == null) { return null; } if (!isForce() || rmr.isForce()) { return rmr; } return new ResolvedModuleRevision( rmr.getResolver(), rmr.getArtifactResolver(), rmr.getDescriptor(), rmr.getReport(), true); }
protected boolean shouldReturnResolvedModule(DependencyDescriptor dd, ResolvedModuleRevision mr) { // a resolved module revision has already been found by a prior dependency resolver // let's see if it should be returned and bypass this resolver ModuleRevisionId mrid = dd.getDependencyRevisionId(); boolean isDynamic = getSettings().getVersionMatcher().isDynamic(mrid); boolean shouldReturn = mr.isForce(); shouldReturn |= !isDynamic && !mr.getDescriptor().isDefault(); shouldReturn &= !isForce(); return shouldReturn; }