Skip to content

Instantly share code, notes, and snippets.

@xconnecting
Created November 9, 2012 02:50
Show Gist options
  • Save xconnecting/4043415 to your computer and use it in GitHub Desktop.
Save xconnecting/4043415 to your computer and use it in GitHub Desktop.
Gradle: Check current OS
ant.condition(property: "os", value: "windows") { os(family: "windows") }
ant.condition(property: "os", value: "unix" ) { os(family: "unix") }
task typeos << {
switch(ant.properties.os){
case 'windows':
println 'This is windows.'
break
case 'unix':
println 'This is unix.'
break
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment