All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openbakery.coverage.CoveragePluginExtension.groovy Maven / Gradle / Ivy

Go to download

XCode-Plugin is a plugin to allow custom XCode projects to build as generated by CMake

There is a newer version: 0.0.201
Show newest version
package org.openbakery.coverage

import org.gradle.api.Project

class CoveragePluginExtension {

	def Object outputDirectory
	def String exclude = null
	def String include = null
	def String outputFormat = null

	private final Project project

	public CoveragePluginExtension(Project project) {
		this.project = project
		this.outputDirectory = {
			return project.getFileResolver().withBaseDir(project.getBuildDir()).resolve("report/coverage")
		}
	}

	File getOutputDirectory() {
		return project.file(outputDirectory)
	}

	void setOutputDirectory(Object outputDirectory) {
		this.outputDirectory = outputDirectory
	}


	String[] getOutputParameter() {
		if (outputFormat != null) {
			if (outputFormat.toLowerCase().equals("xml")) {
				return ["--xml"]
			}
			if (outputFormat.toLowerCase().equals("html")) {
				return ["--html", "--html-details"]
			}
		}
		return [];
	}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy