use of org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1 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));
}
use of org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1 in project gradle by gradle.
the class FavoritesEditorWrapper method getFavoriteTasks.
public List<FavoriteTaskVersion1> getFavoriteTasks() {
List<FavoriteTaskVersion1> returnedTasks = new ArrayList<FavoriteTaskVersion1>();
Iterator<FavoriteTask> taskIterator = favoritesEditor.getFavoriteTasks().iterator();
while (taskIterator.hasNext()) {
FavoriteTask favoriteTask = taskIterator.next();
returnedTasks.add(new FavoriteTaskWrapper(favoriteTask));
}
return returnedTasks;
}
use of org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1 in project gradle by gradle.
the class FavoritesEditorWrapper method removeFavorites.
public void removeFavorites(List<FavoriteTaskVersion1> favoritesToRemove) {
List<FavoriteTask> favoriteTasksToRemove = new ArrayList<FavoriteTask>();
Iterator<FavoriteTaskVersion1> iterator = favoritesToRemove.iterator();
while (iterator.hasNext()) {
FavoriteTaskVersion1 favoriteTaskVersion1 = iterator.next();
favoriteTasksToRemove.add(getFavoriteTask(favoriteTaskVersion1));
}
favoritesEditor.removeFavorites(favoriteTasksToRemove);
}
Aggregations