org.gradle.api.reporting.SingleFileReport Java Examples

The following examples show how to use org.gradle.api.reporting.SingleFileReport. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CodeNarcReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public CodeNarcReportsImpl(Task task) {
    super(SingleFileReport.class, task);

    add(TaskGeneratedSingleFileReport.class, "xml", task);
    add(TaskGeneratedSingleFileReport.class, "html", task);
    add(TaskGeneratedSingleFileReport.class, "text", task);
}
 
Example #2
Source File: FindBugsReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public FindBugsReportsImpl(Task task) {
    super(SingleFileReport.class, task);

    add(FindBugsXmlReportImpl.class, "xml", task);
    add(TaskGeneratedSingleFileReport.class, "html", task);
    add(TaskGeneratedSingleFileReport.class, "text", task);
    add(TaskGeneratedSingleFileReport.class, "emacs", task);
}
 
Example #3
Source File: CodeNarcReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public CodeNarcReportsImpl(Task task) {
    super(SingleFileReport.class, task);

    add(TaskGeneratedSingleFileReport.class, "xml", task);
    add(TaskGeneratedSingleFileReport.class, "html", task);
    add(TaskGeneratedSingleFileReport.class, "text", task);
}
 
Example #4
Source File: FindBugsReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public FindBugsReportsImpl(Task task) {
    super(SingleFileReport.class, task);

    add(FindBugsXmlReportImpl.class, "xml", task);
    add(TaskGeneratedSingleFileReport.class, "html", task);
    add(TaskGeneratedSingleFileReport.class, "text", task);
    add(TaskGeneratedSingleFileReport.class, "emacs", task);
}
 
Example #5
Source File: FindBugsReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public FindBugsReportsImpl(Task task) {
    super(SingleFileReport.class, task);

    add(FindBugsXmlReportImpl.class, "xml", task);
    add(TaskGeneratedSingleFileReport.class, "html", task);
    add(TaskGeneratedSingleFileReport.class, "text", task);
    add(TaskGeneratedSingleFileReport.class, "emacs", task);
}
 
Example #6
Source File: FindBugsReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getHtml() {
    return getByName("html");
}
 
Example #7
Source File: JacocoReportsContainerImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getCsv() {
    return (SingleFileReport)getByName("csv");
}
 
Example #8
Source File: FindBugsReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getText() {
    return getByName("text");
}
 
Example #9
Source File: PmdReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PmdReportsImpl(Task task) {
    super(SingleFileReport.class, task);
    
    add(TaskGeneratedSingleFileReport.class, "html", task);
    add(TaskGeneratedSingleFileReport.class, "xml", task);
}
 
Example #10
Source File: JDependReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getXml() {
    return getByName("xml");
}
 
Example #11
Source File: JDependReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public JDependReportsImpl(Task task) {
    super(SingleFileReport.class, task);
    
    add(TaskGeneratedSingleFileReport.class, "xml", task);
    add(TaskGeneratedSingleFileReport.class, "text", task);
}
 
Example #12
Source File: CodeNarcReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getXml() {
    return getByName("xml");
}
 
Example #13
Source File: CheckstyleReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public CheckstyleReportsImpl(Task task) {
    super(SingleFileReport.class, task);
    
    add(TaskGeneratedSingleFileReport.class, "xml", task);
}
 
Example #14
Source File: CodeNarcReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getHtml() {
    return getByName("html");
}
 
Example #15
Source File: PmdReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getHtml() {
    return getByName("html");
}
 
Example #16
Source File: PmdReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getHtml() {
    return getByName("html");
}
 
Example #17
Source File: JacocoReportsContainerImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getXml() {
    return (SingleFileReport)getByName("xml");
}
 
Example #18
Source File: CodeNarcReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getText() {
    return getByName("text");
}
 
Example #19
Source File: CodeNarcReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getText() {
    return getByName("text");
}
 
Example #20
Source File: JacocoReportsContainerImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getCsv() {
    return (SingleFileReport)getByName("csv");
}
 
Example #21
Source File: CodeNarcReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getXml() {
    return getByName("xml");
}
 
Example #22
Source File: FindBugsReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getText() {
    return getByName("text");
}
 
Example #23
Source File: JDependReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getText() {
    return getByName("text");
}
 
Example #24
Source File: JDependReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public JDependReportsImpl(Task task) {
    super(SingleFileReport.class, task);
    
    add(TaskGeneratedSingleFileReport.class, "xml", task);
    add(TaskGeneratedSingleFileReport.class, "text", task);
}
 
Example #25
Source File: CheckstyleReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getXml() {
    return getByName("xml");
}
 
Example #26
Source File: CheckstyleReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public CheckstyleReportsImpl(Task task) {
    super(SingleFileReport.class, task);
    
    add(TaskGeneratedSingleFileReport.class, "xml", task);
}
 
Example #27
Source File: NoHttpCheckstylePlugin.java    From nohttp with Apache License 2.0 4 votes vote down vote up
private void createCheckstyleTaskForProject(Configuration configuration) {
	Logger logger = this.logger;
	Project project = this.project;
	NoHttpExtension extension = this.extension;
	Checkstyle checkstyleTask = project
			.getTasks().create("checkstyleNohttp", Checkstyle.class);
	checkstyleTask.setDescription("Checks for illegal uses of http://");
	checkstyleTask.getReports().all(new Action<SingleFileReport>() {
		@Override
		public void execute(final SingleFileReport report) {
			String reportFileName = report.getDestination().getName();
			report.setDestination(project.getExtensions().getByType(ReportingExtension.class)
					.getBaseDirectory()
					.dir(checkstyleTask.getName())
					.map(reportDir -> reportDir.file(reportFileName).getAsFile())
			);
		}
	});
	ConventionMapping taskMapping = checkstyleTask.getConventionMapping();
	taskMapping.map("classpath", new Callable<FileCollection>() {
		@Override
		public FileCollection call() throws Exception {
			return configuration;
		}
	});
	taskMapping.map("source", new Callable<FileTree>() {
		@Override
		public FileTree call() throws Exception {
			return extension.getSource();
		}
	});
	boolean configureConfigLoc = configureConfigDirectory(checkstyleTask);
	taskMapping.map("configProperties", new Callable<Map<String, Object>>() {
		@Override
		public Map<String, Object> call() throws Exception {
			Map<String, Object> configProperties = new HashMap<>();
			File allowlistFile = extension.getAllowlistFile();
			if (allowlistFile != null) {
				logger.debug("Using allowlist at {}", allowlistFile);
				String allowlistPath = project.relativePath(allowlistFile);
				configProperties.put("nohttp.checkstyle.allowlistFileName", allowlistPath);
			}
			if (configureConfigLoc) {
				configProperties.put("config_loc", project.relativePath(getConfigLocation()));
			}
			return configProperties;
		}
	});
	taskMapping.map("config", new Callable<TextResource>() {
		@Override
		public TextResource call() throws Exception {
			File configLoc = getConfigLocation();
			File defaultCheckstyleFile = new File(configLoc, "checkstyle.xml");
			if (defaultCheckstyleFile.exists()) {
				logger.debug("Found default checkstyle configuration, so configuring checkstyleTask to use it");
				return project.getResources().getText().fromFile(defaultCheckstyleFile);
			}
			logger.debug("No checkstyle configuration provided, so using the default.");
			URL resource = getClass().getResource(
					"/io/spring/nohttp/checkstyle/default-nohttp-checkstyle.xml");
			return project.getResources().getText().fromUri(resource);
		}
	});
}
 
Example #28
Source File: PmdReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getHtml() {
    return getByName("html");
}
 
Example #29
Source File: PmdReportsImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PmdReportsImpl(Task task) {
    super(SingleFileReport.class, task);
    
    add(TaskGeneratedSingleFileReport.class, "html", task);
    add(TaskGeneratedSingleFileReport.class, "xml", task);
}
 
Example #30
Source File: CodeNarcReportsImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SingleFileReport getXml() {
    return getByName("xml");
}