Package org.gradle.api.tasks.diagnostics

Examples of org.gradle.api.tasks.diagnostics.TaskReportTask


    public void apply(Project project) {
        project.getPlugins().apply(ReportingBasePlugin.class);
        project.getConvention().getPlugins().put("projectReports", new ProjectReportsPluginConvention(project));

        TaskReportTask taskReportTask = project.getTasks().add(TASK_REPORT, TaskReportTask.class);
        taskReportTask.setDescription("Generates a report about your tasks.");
        taskReportTask.conventionMapping("outputFile", new ConventionValue() {
            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
                return new File(convention.getPlugin(ProjectReportsPluginConvention.class).getProjectReportDir(), "tasks.txt");
            }
        });
        taskReportTask.conventionMapping("projects", new ConventionValue() {
            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
                return convention.getPlugin(ProjectReportsPluginConvention.class).getProjects();
            }
        });
View Full Code Here


    public void apply(Project project) {
        project.apply(ImmutableMap.of("type", ReportingBasePlugin.class));
        final ProjectReportsPluginConvention convention = new ProjectReportsPluginConvention(project);
        project.getConvention().getPlugins().put("projectReports", convention);

        TaskReportTask taskReportTask = project.getTasks().create(TASK_REPORT, TaskReportTask.class);
        taskReportTask.setDescription("Generates a report about your tasks.");
        taskReportTask.conventionMapping("outputFile", new Callable<Object>() {
            public Object call() throws Exception {
                return new File(convention.getProjectReportDir(), "tasks.txt");
            }
        });
        taskReportTask.conventionMapping("projects", new Callable<Object>() {
            public Object call() throws Exception {
                return convention.getProjects();
            }
        });
View Full Code Here

TOP

Related Classes of org.gradle.api.tasks.diagnostics.TaskReportTask

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.