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

flair.gradle.tasks.variantFactories.InstallTaskFactory.groovy Maven / Gradle / Ivy

package flair.gradle.tasks.variantFactories

import flair.gradle.tasks.Install
import flair.gradle.tasks.TaskDefinition
import flair.gradle.variants.Variant
import org.gradle.api.Project

/**
 * @author SamYStudiO ( [email protected] )
 */
public class InstallTaskFactory implements IVariantTaskFactory
{
	public Install create( Project project , Variant variant )
	{
		String variantName = variant.getNameWithType( Variant.NamingTypes.CAPITALIZE )
		String name = TaskDefinition.INSTALL.name + variantName

		Install t = project.tasks.findByName( name ) as Install

		if( !t ) t = project.tasks.create( name , Install )

		t.group = TaskDefinition.INSTALL.group.name
		t.variant = variant
		t.dependsOn TaskDefinition.PACKAGE.name + variantName

		return t
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy