use of org.gradle.openapi.wrappers.foundation.favorites.FavoriteTaskWrapper in project gradle by gradle.
the class GradleInterfaceWrapperVersion2 method executeFavorites.
/**
* Executes several favorites commands at once as a single command. This has the affect of simply concatenating all the favorite command lines into a single line.
*
* @param favorites a list of favorites. If just one favorite, it executes it normally. If multiple favorites, it executes them all at once as a single command.
*/
public RequestVersion1 executeFavorites(List<FavoriteTaskVersion1> favorites) {
List<FavoriteTask> tasks = new ArrayList<FavoriteTask>();
Iterator<FavoriteTaskVersion1> iterator = favorites.iterator();
while (iterator.hasNext()) {
FavoriteTaskVersion1 favoriteTaskVersion1 = iterator.next();
FavoriteTaskWrapper wrapper = (FavoriteTaskWrapper) favoriteTaskVersion1;
tasks.add(wrapper.getFavoriteTask());
}
return wrapRequest(gradlePluginLord.addExecutionRequestToQueue(tasks));
}
Aggregations