docs: private DeclaredDependencies getDependenciesViaIdeaModel(ProjectConnection connection) {
          DeclaredDependencies declaredDependencies = new DeclaredDependencies();
  
          // 1. Get the IdeaProject model from the Gradle connection.
          IdeaProject prj = connection.getModel(IdeaProject.class);
          prj.getModules().forEach(this::computeProjectDependencies);
  
          // 2. Find the IdeaModule that maps to the project that we are looking at.
          Optional<? extends IdeaModule> prjModule = prj.getModules().stream()
                  .filter(m -> m.getGradleProject().getProjectDirectory().toPath().equals(rootPath))
                  .findFirst();
  
  
          // We need to return the following collection of dependencies,
          // 1. For the current project, return all artifacts that are marked as ["COMPILE", "TEST"]
          // 2. From the upstream-projects, add all dependencies that are marked as ["COMPILE"]
          // 3. For the current project, iterate through each dependencies marked as ["PROVIDED"] and do the following,
          //      a.) Check if they are already available from 1 & 2. If yes, then nothing to do here.
          //      b.) Check if this entry is defined as ["TEST"] in the upstream-projects. If yes, then include it.
          //          -- The reason for doing this is because of the optimization that Gradle does on the IdeaModule library set.
          Set<ArtifactSpec> collectedDependencies = new HashSet<>();
          prjModule.ifPresent(m -> {
              Map<String, Set<ArtifactSpec>> currentPrjDeps = ARTIFACT_DEPS_OF_PRJ.get(m.getName());
              Set<String> upstreamProjects = PRJ_DEPS_OF_PRJ.getOrDefault(m.getName(), emptySet());
  
              collectedDependencies.addAll(currentPrjDeps.getOrDefault(DEP_SCOPE_COMPILE, emptySet()));
              collectedDependencies.addAll(currentPrjDeps.getOrDefault(DEP_SCOPE_TEST, emptySet()));
  
              upstreamProjects.forEach(moduleName -> {
                  Map<String, Set<ArtifactSpec>> moduleDeps = ARTIFACT_DEPS_OF_PRJ.getOrDefault(moduleName, emptyMap());
                  collectedDependencies.addAll(moduleDeps.getOrDefault(DEP_SCOPE_COMPILE, emptySet()));
              });
  
              Set<ArtifactSpec> providedScopeDeps = currentPrjDeps.getOrDefault(DEP_SCOPE_PROVIDED, emptySet());
              providedScopeDeps.removeAll(collectedDependencies);
  
              if (!providedScopeDeps.isEmpty()) {
                  List<ArtifactSpec> testScopedLibs = new ArrayList<>();
  
                  upstreamProjects.forEach(moduleName -> testScopedLibs.addAll(
                          ARTIFACT_DEPS_OF_PRJ.getOrDefault(moduleName, emptyMap())
                                  .getOrDefault(DEP_SCOPE_TEST, emptySet())));
                  providedScopeDeps.stream().filter(testScopedLibs::contains).forEach(collectedDependencies::add);
              }
  
          });
  
          collectedDependencies.forEach(declaredDependencies::add);
          return declaredDependencies;
      }