Formatting.
This commit is contained in:
parent
5672ad96b0
commit
0531a8a139
1 changed files with 21 additions and 21 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue