- http://stackoverflow.com/questions/28440559/gradle-creating-build-directory-in-subfolder
- https://github.com/gradle/gradle/blob/master/settings.gradle
1. Sub Project Folder Name : api-log-model
2. Sub Module Name : apiLogModel
範例
git submodule add git@longtai.com:login/api-login-model.git module/api-login-model
.gitmodules
[submodule "module/api-log-model"]path = module/ApiLogModel
url = git@longtai.com:login/api-login-model.git
setting.gradle
include 'apiLogModel' rootProject.name = 'TestSubfolder' rootProject.name = 'gradle' rootProject.children.each {project -> String fileBaseName = project.name.replaceAll("\\p{Upper}") { "-${it.toLowerCase()}" } String projectDirName = "subprojects/$fileBaseName" project.projectDir = new File(settingsDir, projectDirName) project.buildFileName = "${fileBaseName}.gradle" assert project.projectDir.isDirectory() assert project.buildFile.isFile() }