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

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

package flair.gradle.tasks.variantFactories

import flair.gradle.tasks.TaskDefinition
import flair.gradle.tasks.process.ProcessAsLibraries
import flair.gradle.variants.Variant
import org.gradle.api.Project

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

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

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

		t.group = TaskDefinition.PROCESS_AS_LIBRARIES.group.name
		t.variant = variant

		return t
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy