// the launchable may hold onto. For example, GradleTask implementations hold onto every task for every project in the build
List<TaskExecutionRequest> requests = new ArrayList<TaskExecutionRequest>(launchables.size());
for (InternalLaunchable launchable : launchables) {
if (launchable instanceof TaskExecutionRequest) {
TaskExecutionRequest originalLaunchable = (TaskExecutionRequest) launchable;
TaskExecutionRequest launchableImpl = new DefaultTaskExecutionRequest(originalLaunchable.getArgs(), originalLaunchable.getProjectPath());
requests.add(launchableImpl);
} else {
throw new InternalUnsupportedBuildArgumentException(
"Problem with provided launchable arguments: " + launchables + ". "
+ "\nOnly objects from this provider can be built."