From 0531a8a13924c10ea933ed4b884159aacfebc7f0 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 30 Apr 2017 15:59:56 -0700 Subject: [PATCH] Formatting. --- .../erik/kobalt/plugin/exec/ExecPlugin.kt | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt index d21bb39..9dccff5 100644 --- a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt +++ b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt @@ -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()