use of org.gradle.internal.DefaultTaskExecutionRequest in project gradle by gradle.
the class ProviderStartParameterConverter method unpack.
private List<TaskExecutionRequest> unpack(final List<InternalLaunchable> launchables, File projectDir) {
// Important that the launchables are unpacked on the client side, to avoid sending back any additional internal state that
// 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(), originalLaunchable.getRootDir());
requests.add(launchableImpl);
} else {
throw new InternalUnsupportedBuildArgumentException("Problem with provided launchable arguments: " + launchables + ". " + "\nOnly objects from this provider can be built.");
}
}
return requests;
}
use of org.gradle.internal.DefaultTaskExecutionRequest in project gradle by gradle.
the class ProviderStartParameterConverter method unpack.
private List<TaskExecutionRequest> unpack(final List<InternalLaunchable> launchables) {
// Important that the launchables are unpacked on the client side, to avoid sending back any additional internal state that
// 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(), originalLaunchable.getRootDir());
requests.add(launchableImpl);
} else {
throw new InternalUnsupportedBuildArgumentException("Problem with provided launchable arguments: " + launchables + ". " + "\nOnly objects from this provider can be built.");
}
}
return requests;
}
Aggregations