Formatting.

This commit is contained in:
Erik C. Thauvin 2017-04-30 15:59:56 -07:00
parent 5672ad96b0
commit 0531a8a139

View file

@ -72,6 +72,27 @@ class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val c
}
}
private fun isCygwin(): Boolean {
val path: String? = System.getenv("ORIGINAL_PATH")
return path?.contains("/cygdrive/") ?: false
}
private fun isMinGW(os: Os = Os.MINGW, any: Boolean = false): Boolean {
val msys: String? = System.getenv("MSYSTEM")
if (!msys.isNullOrBlank()) {
if (any) {
return true
} else if (os.equals(Os.MSYS)) {
return msys!!.startsWith("MSYS")
} else if (os.equals(Os.MINGW)) {
return msys!!.startsWith("MINGW")
}
}
return false
}
private fun matchOs(os: Os): Boolean {
val curOs: String = System.getProperty("os.name").toLowerCase(Locale.US)
when (os) {
@ -118,27 +139,6 @@ class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val c
}
}
private fun isCygwin() : Boolean {
val path: String? = System.getenv("ORIGINAL_PATH")
return path?.contains("/cygdrive/") ?: false
}
private fun isMinGW(os: Os = Os.MINGW, any: Boolean = false) : Boolean {
val msys: String? = System.getenv("MSYSTEM")
if (!msys.isNullOrBlank()) {
if (any) {
return true
} else if (os.equals(Os.MSYS)) {
return msys!!.startsWith("MSYS")
} else if (os.equals(Os.MINGW)) {
return msys!!.startsWith("MINGW")
}
}
return false
}
private fun executeCommands(project: Project, config: ExecConfig): TaskResult {
var success = true
val errorMessage = StringBuilder()