Created
October 9, 2016 15:02
-
-
Save ShaunPlummer/e88dba1f3efc304587c71d13455300ab to your computer and use it in GitHub Desktop.
Simple gradle OS check
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
import org.apache.tools.ant.taskdefs.condition.Os | |
task(OSCheck) << { | |
if (Os.isFamily(Os.FAMILY_WINDOWS)) { | |
println " IS WINDOWS " | |
} else if(Os.isFamily(Os.FAMILY_MAC)) { | |
println " IS MAC " | |
} else if(Os.isFamily(Os.FAMILY_UNIX)) { | |
println " IS UNIX " | |
} else { | |
println " Other OS " | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment