Gradle provides method to check operating system,so use it.