godot.gradle.projectExt.checkToolAccessible.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-gradle-plugin Show documentation
Show all versions of godot-gradle-plugin Show documentation
Godot gradle plugin for kotlin language support.
The newest version!
package godot.gradle.projectExt
import org.gradle.api.Project
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
fun Project.checkToolAccessible(toolPath: String) = exec {
with(it) {
workingDir = projectDir
isIgnoreExitValue = true
if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows) {
commandLine("cmd", "/c", toolPath, "--version")
} else {
commandLine(toolPath, "--version")
}
}
}