Created
April 5, 2013 21:50
-
-
Save hanbei/5322938 to your computer and use it in GitHub Desktop.
A gradle task to create the initial project structure
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
apply plugin: 'java' | |
task initProject () << { | |
if (hasProperty(initPlugins)) { | |
initPlugins.split(',').each { plug -> project.apply { plugin(plug.trim()) } } | |
} | |
project.sourceSets*.allSource.srcDirTrees.flatten().dir.each { dir -> | |
dir.mkdirs() | |
} | |
} | |
call as | |
gradle initProject -PinitPlugins=java |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment