Search in sources :

Example 1 with ProjectVersion1

use of org.gradle.openapi.external.foundation.ProjectVersion1 in project gradle by gradle.

the class ProjectWrapper method convertProjects.

/**
     * Converts the list of ProjectView objects to ProjectVersion1 objects. It just wraps them.
     *
     * @param projectViewList the source projects
     * @return the projects wrapped in ProjectWrappers.
     */
public static List<ProjectVersion1> convertProjects(List<ProjectView> projectViewList) {
    List<ProjectVersion1> returnProjects = new ArrayList<ProjectVersion1>();
    if (projectViewList != null) {
        Iterator<ProjectView> projectViewIterator = projectViewList.iterator();
        while (projectViewIterator.hasNext()) {
            ProjectView projectView = projectViewIterator.next();
            returnProjects.add(new ProjectWrapper(projectView));
        }
    }
    return returnProjects;
}
Also used : ArrayList(java.util.ArrayList) ProjectView(org.gradle.foundation.ProjectView) ProjectVersion1(org.gradle.openapi.external.foundation.ProjectVersion1)

Aggregations

ArrayList (java.util.ArrayList)1 ProjectView (org.gradle.foundation.ProjectView)1 ProjectVersion1 (org.gradle.openapi.external.foundation.ProjectVersion1)1