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

org.kt3k.gradle.plugin.CoverallsPlugin.groovy Maven / Gradle / Ivy

There is a newer version: 2.8.3
Show newest version
package org.kt3k.gradle.plugin

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
import org.kt3k.gradle.plugin.coveralls.CoverallsTask

/**
 * Coveralls plugin for gradle.
 *
 * This plugin adds the only one task `coveralls` which searches coverage report xml, converts it into JSON string and post to coveralls.io.
 */
class CoverallsPlugin implements Plugin {

	/**
	 * Add `coveralls` task to the project.
	 *
	 * @param project the project to add coveralls task
	 */
	void apply(Project project) {

		// create coveralls project extension
		project.extensions.create('coveralls', CoverallsPluginExtension)

		// register coveralls task
		Task task = project.task('coveralls', type: CoverallsTask)

		// set env vars
		task.env = System.getenv()

	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy