rootProject.name = 'postssystem' String[] includes = [ ":features:common:common", ":features:common:client", ":features:common:server", ":features:files:common", ":features:files:client", ":features:files:server", ":features:status:common", ":features:status:client", ":features:status:server", ":features:users:common", ":features:users:client", ":features:users:server", ":features:roles:common", ":features:roles:client", ":features:roles:server", ":features:roles:manager:common", ":features:roles:manager:client", ":features:roles:manager:server", ":features:auth:common", ":features:auth:client", ":features:auth:server", ":features:content:common", ":features:content:client", ":features:content:server", ":features:content:text:common", ":features:content:text:client", ":features:content:text:server", ":server", ":client", ] includes.each { originalName -> String projectDirectory = "${rootProject.projectDir.getAbsolutePath()}${originalName.replaceAll(":", File.separator)}" String projectName = "${rootProject.name}${originalName.replaceAll(":", ".")}" String projectIdentifier = ":${projectName}" include projectIdentifier ProjectDescriptor project = project(projectIdentifier) project.name = projectName project.projectDir = new File(projectDirectory) println(project) }