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

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

package flair.gradle.tasks.variantFactories

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

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

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

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

		t.group = TaskDefinition.PROCESS_ASSETS.group.name
		t.variant = variant

		return t
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy