Skip to content

Instantly share code, notes, and snippets.

@ShaunPlummer
Created October 9, 2016 15:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShaunPlummer/e88dba1f3efc304587c71d13455300ab to your computer and use it in GitHub Desktop.
Save ShaunPlummer/e88dba1f3efc304587c71d13455300ab to your computer and use it in GitHub Desktop.
Simple gradle OS check
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