Java 类org.gradle.api.tasks.TaskOutputs 实例源码

项目:Reer    文件:CompositeTaskOutputPropertySpec.java   
public CompositeTaskOutputPropertySpec(TaskOutputs taskOutputs, String taskName, FileResolver resolver, CacheableTaskOutputFilePropertySpec.OutputType outputType, Object[] paths) {
    super(taskOutputs);
    this.taskName = taskName;
    this.resolver = resolver;
    this.outputType = outputType;
    this.paths = (paths != null && paths.length == 1)
        ? paths[0]
        : paths;
}
项目:Reer    文件:DefaultCacheableTaskOutputFilePropertySpec.java   
public DefaultCacheableTaskOutputFilePropertySpec(TaskOutputs taskOutputs, String taskName, FileResolver resolver, OutputType outputType, Object path) {
    super(taskOutputs);
    this.resolver = resolver;
    this.outputType = outputType;
    this.path = path;
    this.files = new TaskPropertyFileCollection(taskName, "output", this, resolver, path);
}
项目:Reer    文件:DefaultFileCollectionResolveContext.java   
private <T> List<T> doResolve(Converter<? extends T> converter) {
    List<T> result = new ArrayList<T>();
    while (!queue.isEmpty()) {
        Object element = queue.remove(0);
        // TODO - need to sync with BuildDependenciesOnlyFileCollectionResolveContext
        if (element instanceof DefaultFileCollectionResolveContext) {
            DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
            converter.convertInto(nestedContext, result, fileResolver);
        } else if (element instanceof FileCollectionContainer) {
            FileCollectionContainer fileCollection = (FileCollectionContainer) element;
            resolveNested(fileCollection, result, converter);
        } else if (element instanceof FileCollection || element instanceof MinimalFileCollection) {
            converter.convertInto(element, result, fileResolver);
        } else if (element instanceof Task) {
            Task task = (Task) element;
            queue.add(0, task.getOutputs().getFiles());
        } else if (element instanceof TaskOutputs) {
            TaskOutputs outputs = (TaskOutputs) element;
            queue.add(0, outputs.getFiles());
        } else if (element instanceof Callable) {
            Callable callable = (Callable) element;
            Object callableResult = uncheckedCall(callable);
            if (callableResult != null) {
                queue.add(0, callableResult);
            }
        } else if (element instanceof Iterable) {
            Iterable<?> iterable = (Iterable) element;
            GUtil.addToCollection(queue.subList(0, 0), iterable);
        } else if (element instanceof Object[]) {
            Object[] array = (Object[]) element;
            GUtil.addToCollection(queue.subList(0, 0), Arrays.asList(array));
        } else {
            converter.convertInto(element, result, fileResolver);
        }
    }
    return result;
}
项目:Pushjet-Android    文件:DefaultTaskOutputs.java   
public TaskOutputs files(final Object... paths) {
    taskMutator.mutate("TaskOutputs.files(Object...)", new Runnable() {
        public void run() {
            outputFiles.from(paths);
        }
    });
    return this;
}
项目:Pushjet-Android    文件:DefaultTaskOutputs.java   
public TaskOutputs file(final Object path) {
    taskMutator.mutate("TaskOutputs.file(Object)", new Runnable() {
        public void run() {
            outputFiles.from(path);
        }
    });
    return this;
}
项目:Pushjet-Android    文件:DefaultTaskOutputs.java   
public TaskOutputs dir(final Object path) {
    taskMutator.mutate("TaskOutputs.dir(Object)", new Runnable() {
        public void run() {
            outputFiles.from(path);
        }
    });
    return this;
}
项目:Reer    文件:AbstractTaskOutputPropertySpec.java   
protected AbstractTaskOutputPropertySpec(TaskOutputs taskOutputs) {
    super(taskOutputs);
}
项目:Reer    文件:AbstractTaskOutputsDeprecatingTaskPropertyBuilder.java   
public AbstractTaskOutputsDeprecatingTaskPropertyBuilder(TaskOutputs taskOutputs) {
    this.taskOutputs = taskOutputs;
}
项目:Reer    文件:AbstractTaskOutputsDeprecatingTaskPropertyBuilder.java   
private TaskOutputs getTaskOutputs(String method) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("chaining of the " + method, String.format("Use '%s' on TaskOutputs directly instead.", method));
    return taskOutputs;
}
项目:Reer    文件:NonCacheableTaskOutputPropertySpec.java   
public NonCacheableTaskOutputPropertySpec(TaskOutputs taskOutputs, String taskName, CompositeTaskOutputPropertySpec parent, FileResolver resolver, Object paths) {
    super(taskOutputs);
    this.parent = parent;
    this.files = new TaskPropertyFileCollection(taskName, "output", this, resolver, paths);
}
项目:Pushjet-Android    文件:DefaultFileCollectionResolveContext.java   
private <T> List<T> doResolve(Converter<? extends T> converter) {
    List<T> result = new ArrayList<T>();
    while (!queue.isEmpty()) {
        Object element = queue.remove(0);
        if (element instanceof DefaultFileCollectionResolveContext) {
            DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
            converter.convertInto(nestedContext, result, fileResolver);
        } else if (element instanceof FileCollectionContainer) {
            FileCollectionContainer fileCollection = (FileCollectionContainer) element;
            resolveNested(fileCollection);
        } else if (element instanceof FileCollection || element instanceof MinimalFileCollection) {
            converter.convertInto(element, result, fileResolver);
        } else if (element instanceof Task) {
            Task task = (Task) element;
            queue.add(0, task.getOutputs().getFiles());
        } else if (element instanceof TaskOutputs) {
            TaskOutputs outputs = (TaskOutputs) element;
            queue.add(0, outputs.getFiles());
        } else if (element instanceof Closure) {
            Closure closure = (Closure) element;
            Object closureResult = closure.call();
            if (closureResult != null) {
                queue.add(0, closureResult);
            }
        } else if (element instanceof Callable) {
            Callable callable = (Callable) element;
            Object callableResult;
            try {
                callableResult = callable.call();
            } catch (Exception e) {
                throw UncheckedException.throwAsUncheckedException(e);
            }
            if (callableResult != null) {
                queue.add(0, callableResult);
            }
        } else if (element instanceof Iterable) {
            Iterable<?> iterable = (Iterable) element;
            GUtil.addToCollection(queue.subList(0, 0), iterable);
        } else if (element instanceof Object[]) {
            Object[] array = (Object[]) element;
            GUtil.addToCollection(queue.subList(0, 0), Arrays.asList(array));
        } else {
            converter.convertInto(element, result, fileResolver);
        }
    }
    return result;
}
项目:Pushjet-Android    文件:DefaultTaskOutputs.java   
public TaskOutputs files(Object... paths) {
    taskStatusNagger.nagIfTaskNotInConfigurableState("TaskOutputs.files(Object...)");
    outputFiles.from(paths);
    return this;
}
项目:Pushjet-Android    文件:DefaultTaskOutputs.java   
public TaskOutputs file(Object path) {
    taskStatusNagger.nagIfTaskNotInConfigurableState("TaskOutputs.file(Object)");
    files(path);
    return this;
}
项目:Pushjet-Android    文件:DefaultTaskOutputs.java   
public TaskOutputs dir(final Object path) {
    taskStatusNagger.nagIfTaskNotInConfigurableState("TaskOutputs.dir(Object)");
    outputFiles.from(path);
    return this;
}
项目:Pushjet-Android    文件:DefaultFileCollectionResolveContext.java   
private <T> List<T> doResolve(Converter<? extends T> converter) {
    List<T> result = new ArrayList<T>();
    while (!queue.isEmpty()) {
        Object element = queue.remove(0);
        if (element instanceof DefaultFileCollectionResolveContext) {
            DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
            converter.convertInto(nestedContext, result, fileResolver);
        } else if (element instanceof FileCollectionContainer) {
            FileCollectionContainer fileCollection = (FileCollectionContainer) element;
            resolveNested(fileCollection);
        } else if (element instanceof FileCollection || element instanceof MinimalFileCollection) {
            converter.convertInto(element, result, fileResolver);
        } else if (element instanceof Task) {
            Task task = (Task) element;
            queue.add(0, task.getOutputs().getFiles());
        } else if (element instanceof TaskOutputs) {
            TaskOutputs outputs = (TaskOutputs) element;
            queue.add(0, outputs.getFiles());
        } else if (element instanceof Closure) {
            Closure closure = (Closure) element;
            Object closureResult = closure.call();
            if (closureResult != null) {
                queue.add(0, closureResult);
            }
        } else if (element instanceof Callable) {
            Callable callable = (Callable) element;
            Object callableResult;
            try {
                callableResult = callable.call();
            } catch (Exception e) {
                throw UncheckedException.throwAsUncheckedException(e);
            }
            if (callableResult != null) {
                queue.add(0, callableResult);
            }
        } else if (element instanceof Iterable) {
            Iterable<?> iterable = (Iterable) element;
            GUtil.addToCollection(queue.subList(0, 0), iterable);
        } else if (element instanceof Object[]) {
            Object[] array = (Object[]) element;
            GUtil.addToCollection(queue.subList(0, 0), Arrays.asList(array));
        } else {
            converter.convertInto(element, result, fileResolver);
        }
    }
    return result;
}
项目:Reer    文件:Task.java   
/**
 * <p>Returns the outputs of this task.</p>
 *
 * @return The outputs. Never returns null.
 */
TaskOutputs getOutputs();
项目:Pushjet-Android    文件:Task.java   
/**
 * <p>Returns the outputs of this task.</p>
 *
 * @return The outputs. Never returns null.
 */
TaskOutputs getOutputs();
项目:Pushjet-Android    文件:Task.java   
/**
 * <p>Returns the outputs of this task.</p>
 *
 * @return The outputs. Never returns null.
 */
TaskOutputs getOutputs();