@Override public void init(final Object target, ServiceRegistry services) { super.init(target, services); this.__scriptServices = services; loggingManager = services.get(LoggingManager.class); Instantiator instantiator = services.get(Instantiator.class); FileLookup fileLookup = services.get(FileLookup.class); DirectoryFileTreeFactory directoryFileTreeFactory = services.get(DirectoryFileTreeFactory.class); if (target instanceof FileOperations) { fileOperations = (FileOperations) target; } else { File sourceFile = getScriptSource().getResource().getLocation().getFile(); if (sourceFile != null) { fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(sourceFile.getParentFile()), null, null, instantiator, fileLookup, directoryFileTreeFactory); } else { fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(), null, null, instantiator, fileLookup, directoryFileTreeFactory); } } processOperations = (ProcessOperations) fileOperations; }
public void init(final Object target, ServiceRegistry services) { super.init(target, services); this.__scriptServices = services; loggingManager = services.get(LoggingManager.class); Instantiator instantiator = services.get(Instantiator.class); FileLookup fileLookup = services.get(FileLookup.class); if (target instanceof FileOperations) { fileOperations = (FileOperations) target; } else if (getScriptSource().getResource().getFile() != null) { fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(getScriptSource().getResource().getFile().getParentFile()), null, null, instantiator, fileLookup); } else { fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(), null, null, instantiator, fileLookup); } processOperations = (ProcessOperations) fileOperations; }
public LoggingManager getLogging() { return getScriptTarget().getLogging(); }
@Override public LoggingManager getLogging() { return loggingManager; }
public LoggingManager getLogging() { return loggingManager; }
@Override public LoggingManager getLogging() { throw new UnsupportedOperationException(); }
/** * Returns the {@link org.gradle.api.logging.LoggingManager} which can be used to control the logging level and * standard output/error capture for this task. By default, System.out is redirected to the Gradle logging system at * the QUIET log level, and System.err is redirected at the ERROR log level. * * @return the LoggingManager. Never returns null. */ LoggingManager getLogging();
/** * Returns the {@link org.gradle.api.logging.LoggingManager} which can be used to control the logging level and * standard output/error capture for this script. By default, System.out is redirected to the Gradle logging system * at the QUIET log level, and System.err is redirected at the ERROR log level. * * @return the LoggingManager. Never returns null. */ LoggingManager getLogging();
/** * Returns the {@link org.gradle.api.logging.LoggingManager} which can be used to control the logging level and * standard output/error capture for this project's build script. By default, System.out is redirected to the Gradle * logging system at the QUIET log level, and System.err is redirected at the ERROR log level. * * @return the LoggingManager. Never returns null. */ LoggingManager getLogging();