org.openbakery.simulators.SimulatorKillTask.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xcode-plugin Show documentation
Show all versions of xcode-plugin Show documentation
XCode-Plugin is a plugin to allow custom XCode projects to build as generated by CMake
The newest version!
package org.openbakery.simulators
import org.gradle.api.tasks.TaskAction
import org.openbakery.xcode.Type
import org.openbakery.XcodePlugin
class SimulatorKillTask extends AbstractSimulatorTask {
public SimulatorKillTask() {
setDescription("Deletes contents and settings for all Simulators")
this.setOnlyIf {
isSimulator()
}
}
boolean isSimulator() {
project.xcodebuild.isSimulatorBuildOf(Type.iOS) || project.xcodebuild.isSimulatorBuildOf(Type.tvOS)
}
@TaskAction
void run() {
simulatorControl.killAll()
}
}