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

flair.gradle.tasks.ListDevices.groovy Maven / Gradle / Ivy

package flair.gradle.tasks

import flair.gradle.cli.Adb
import flair.gradle.cli.ICli
import flair.gradle.cli.Idb
import flair.gradle.variants.Platform
import org.gradle.api.tasks.TaskAction

/**
 * @author SamYStudiO ( [email protected] )
 */
class ListDevices extends AbstractTask
{
	private ICli idb = new Idb( )

	private ICli adb = new Adb( )

	public Platform platform

	public ListDevices()
	{
		group = TaskGroup.DEVICES.name
		description = ""
	}

	@TaskAction
	public void list()
	{
		if( platform == Platform.IOS )
		{
			idb.addArgument( "-devices" )
			idb.execute( project , Platform.IOS )
		}
		else if( platform == Platform.ANDROID )
		{
			adb.addArgument( "devices" )
			adb.execute( project , Platform.ANDROID )
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy