Package org.gradle.api.tasks

Examples of org.gradle.api.tasks.TaskInstantiationException


        return AbstractTask.injectIntoNewInstance(project, name, new Callable<TaskInternal>() {
            public TaskInternal call() throws Exception {
                try {
                    return constructor.newInstance(params);
                } catch (InvocationTargetException e) {
                    throw new TaskInstantiationException(String.format("Could not create task of type '%s'.", type.getSimpleName()),
                            e.getCause());
                } catch (Exception e) {
                    throw new TaskInstantiationException(String.format("Could not create task of type '%s'.", type.getSimpleName()), e);
                }
            }
        });
    }
View Full Code Here


        return AbstractTask.injectIntoNewInstance(project, name, new Callable<TaskInternal>() {
            public TaskInternal call() throws Exception {
                try {
                    return instantiator.newInstance(generatedType);
                } catch (ObjectInstantiationException e) {
                    throw new TaskInstantiationException(String.format("Could not create task of type '%s'.", type.getSimpleName()),
                            e.getCause());
                }
            }
        });
    }
View Full Code Here

        return nextInstance.get();
    }

    private AbstractTask(TaskInfo taskInfo) {
        if (taskInfo == null) {
            throw new TaskInstantiationException(String.format("Task of type '%s' has been instantiated directly which is not supported. Tasks can only be created using the DSL.", getClass().getName()));
        }

        this.project = taskInfo.project;
        this.name = taskInfo.name;
        assert project != null;
View Full Code Here

TOP

Related Classes of org.gradle.api.tasks.TaskInstantiationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.