use of org.gradle.internal.resource.BasicTextResourceLoader in project gradle by gradle.
the class InitScriptHandler method executeScripts.
public void executeScripts(final GradleInternal gradle) {
final List<File> initScripts = gradle.getStartParameter().getAllInitScripts();
if (initScripts.isEmpty()) {
return;
}
buildOperationExecutor.run(new RunnableBuildOperation() {
@Override
public void run(BuildOperationContext context) {
BasicTextResourceLoader resourceLoader = new BasicTextResourceLoader();
for (File script : initScripts) {
TextResource resource = resourceLoader.loadFile("initialization script", script);
processor.process(new TextResourceScriptSource(resource), gradle);
}
}
@Override
public BuildOperationDescriptor.Builder description() {
return BuildOperationDescriptor.displayName("Run init scripts").progressDisplayName("Running init scripts");
}
});
}
Aggregations