use of org.gradle.api.internal.file.FileResolver in project gradle by gradle.
the class AbstractCopyTask method createRootSpec.
protected CopySpecInternal createRootSpec() {
Instantiator instantiator = getInstantiator();
FileResolver fileResolver = getFileResolver();
return instantiator.newInstance(DefaultCopySpec.class, fileResolver, instantiator);
}
use of org.gradle.api.internal.file.FileResolver in project gradle by gradle.
the class Sync method createRootSpec.
@Override
protected CopySpecInternal createRootSpec() {
Instantiator instantiator = getInstantiator();
FileResolver fileResolver = getFileResolver();
return instantiator.newInstance(DestinationRootCopySpec.class, fileResolver, super.createRootSpec());
}
use of org.gradle.api.internal.file.FileResolver in project gradle by gradle.
the class ValidatingTaskExecuter method execute.
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) {
List<String> messages = Lists.newArrayList();
FileResolver resolver = ((ProjectInternal) task.getProject()).getFileResolver();
final TaskValidationContext validationContext = new DefaultTaskValidationContext(resolver, messages);
try {
context.getTaskProperties().validate(validationContext);
} catch (Exception ex) {
throw new TaskExecutionException(task, ex);
}
if (!messages.isEmpty()) {
List<String> firstMessages = messages.subList(0, Math.min(5, messages.size()));
if (!validationContext.getHighestSeverity().report(task, firstMessages, state)) {
return;
}
}
executer.execute(task, state, context);
}
use of org.gradle.api.internal.file.FileResolver in project gradle by gradle.
the class GroovyCompile method getCompiler.
private Compiler<GroovyJavaJointCompileSpec> getCompiler(GroovyJavaJointCompileSpec spec) {
if (compiler == null) {
ProjectInternal projectInternal = (ProjectInternal) getProject();
WorkerDaemonFactory workerDaemonFactory = getServices().get(WorkerDaemonFactory.class);
IsolatedClassloaderWorkerFactory inProcessWorkerFactory = getServices().get(IsolatedClassloaderWorkerFactory.class);
FileResolver fileResolver = getServices().get(FileResolver.class);
GroovyCompilerFactory groovyCompilerFactory = new GroovyCompilerFactory(projectInternal, workerDaemonFactory, inProcessWorkerFactory, fileResolver);
Compiler<GroovyJavaJointCompileSpec> delegatingCompiler = groovyCompilerFactory.newCompiler(spec);
compiler = new CleaningGroovyCompiler(delegatingCompiler, getOutputs());
}
return compiler;
}
use of org.gradle.api.internal.file.FileResolver in project gradle by gradle.
the class Copy method createRootSpec.
@Override
protected CopySpecInternal createRootSpec() {
Instantiator instantiator = getInstantiator();
FileResolver fileResolver = getFileResolver();
return instantiator.newInstance(DestinationRootCopySpec.class, fileResolver, super.createRootSpec());
}
Aggregations