flair.gradle.tasks.variantFactories.ProcessLibrariesTaskFactory.groovy Maven / Gradle / Ivy
package flair.gradle.tasks.variantFactories
import flair.gradle.tasks.TaskDefinition
import flair.gradle.tasks.process.ProcessLibraries
import flair.gradle.variants.Variant
import org.gradle.api.Project
/**
* @author SamYStudiO ( [email protected] )
*/
class ProcessLibrariesTaskFactory implements IVariantTaskFactory
{
public ProcessLibraries create( Project project , Variant variant )
{
String name = TaskDefinition.PROCESS_LIBRARIES.name + variant.getNameWithType( Variant.NamingTypes.CAPITALIZE )
ProcessLibraries t = project.tasks.findByName( name ) as ProcessLibraries
if( !t ) t = project.tasks.create( name , ProcessLibraries )
t.group = TaskDefinition.PROCESS_LIBRARIES.group.name
t.variant = variant
return t
}
}