code: public List<? extends Archive> asList(final Class<? extends Archive> archive) {
  
        final List<Archive> archives = new ArrayList<>();
        final GradleEffectiveDependencies gradleEffectiveDependencies = GradleRunner.getEffectiveDependencies(projectDirectory);
  
        for (ScopeType scopeType : scopeTypesDependencies) {
           final List<File> dependenciesByScope = gradleEffectiveDependencies.getDependenciesByScope(scopeType);
           for (File dependency : dependenciesByScope) {
              try {
                 final Archive dep = ShrinkWrap.create(ZipImporter.class, dependency.getName()).importFrom(dependency).as(archive);
                 archives.add(dep);
              } catch (Exception e) {
                 log.log(Level.WARNING, "Cannot import gradle dependency " + dependency + ". Not a zip-like format", e);
              }
           }
        }
        return archives;
     }
docs: Gets all dependencies (and the transitive ones too) as given ShrinkWrap Archive type.
  @param archive ShrinkWrap archive.
  @return List of dependencies and transitive ones for configured state.