Skip to content

Instantly share code, notes, and snippets.

@SlyDen
Last active December 23, 2015 17:29
Show Gist options
  • Save SlyDen/6669305 to your computer and use it in GitHub Desktop.
Save SlyDen/6669305 to your computer and use it in GitHub Desktop.
Task to create standard Java application's dir tree with .gitkeep files inside.
task "create-dirs" << {
sourceSets*.java.srcDirs*.each {
it.mkdirs()
(new File("${it}/.gitkeep")).createNewFile()
}
sourceSets*.resources.srcDirs*.each {
it.mkdirs()
(new File("${it}/.gitkeep")).createNewFile()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment