com.github.skhatri.appthwack.plugin.ListPoolsTask.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-appthwack Show documentation
Show all versions of gradle-appthwack Show documentation
Perform various Appthwack Client operations from gradle as part of CI using this plugin
package com.github.skhatri.appthwack.plugin
import com.github.skhatri.appthwack.client.ATClient
import com.github.skhatri.appthwack.client.ProjectType
import org.gradle.api.tasks.TaskAction
/**
*
*/
class ListPoolsTask extends AppthwackTask {
public ListPoolsTask() {
}
@TaskAction
public void perform() {
logger.lifecycle "Listing Device Pools"
ATClient atClient = new ATClient(getApiKey())
List pools = atClient.getPools()
logger.lifecycle "Project Name ".padRight(40, " ") + "ID".padRight(10, " ") + "Type".padRight(10, " ")
logger.lifecycle "".padRight(40, "-") + "".padRight(10, "-") + "".padRight(10, "-")
logger.lifecycle "Pools " + pools
}
}