task java_version(type: Exec) {
workingDir "${buildDir}"
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'cmd', '/c', 'java -version'
} else {
commandLine 'sh', '-c', 'java -version'
}
}