Created
November 9, 2012 02:50
-
-
Save xconnecting/4043415 to your computer and use it in GitHub Desktop.
Gradle: Check current OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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