2020-10-02 19:17:21 +03:00
|
|
|
object Platform {
|
|
|
|
|
2020-10-22 17:12:28 +03:00
|
|
|
/** Returns true if the build system is running on Windows.
|
2020-10-02 19:17:21 +03:00
|
|
|
*/
|
|
|
|
def isWindows: Boolean =
|
|
|
|
sys.props("os.name").toLowerCase().contains("windows")
|
|
|
|
|
2020-10-22 17:12:28 +03:00
|
|
|
/** Returns true if the build system is running on Linux.
|
2020-10-02 19:17:21 +03:00
|
|
|
*/
|
|
|
|
def isLinux: Boolean =
|
|
|
|
sys.props("os.name").toLowerCase().contains("linux")
|
|
|
|
|
2020-10-22 17:12:28 +03:00
|
|
|
/** Returns true if the build system is running on macOS.
|
2020-10-02 19:17:21 +03:00
|
|
|
*/
|
|
|
|
def isMacOS: Boolean =
|
|
|
|
sys.props("os.name").toLowerCase().contains("mac")
|
|
|
|
}
|