code: protected String getRecommendedVersionRecursive(Project project, ModuleVersionSelector mvSelector) {
          String version = project.getExtensions().getByType(RecommendationProviderContainer.class)
                  .getRecommendedVersion(mvSelector.getGroup(), mvSelector.getName());
          if (version != null)
              return version;
          if (project.getParent() != null)
              return getRecommendedVersionRecursive(project.getParent(), mvSelector);
          return null;
      }
docs: Look for recommended versions in a project and each of its ancestors in order until one is found or the root is reached
  
  @param project    the gradle <code>Project</code>
  @param mvSelector the module to lookup
  @return the recommended version or <code>null</code>