工程化的搭建Java环境 - gradle
##Generate typical project layout If you are as lazy as I am, you may want to generate typical project layout automatically, let’s do it by using gradle. Simply add the following lines into your build.gradle: apply plugin: 'java' task "create-dirs" << { sourceSets*.java.srcDirs*.each {it.mkdirs()} sourceSets*.resources.srcDirs*.each {it.mkdirs()} } then using gradle to run the task defined “create-dirs”: $ gradle create-dirs you will get the directories structure like this: . ├── build....