Created
November 28, 2012 01:16
Gradle: git init through command line
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 gitInit(type:Exec){ | |
group = 'Git' | |
description = 'git init' | |
workingDir '.' | |
switch(ant.properties.os){ | |
case 'windows': | |
commandLine 'cmd', '/c', 'git', 'init' | |
break | |
case 'unix': | |
commandLine 'git', 'init' | |
break | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment