rootProject.name='postssystem' String[] includes = [ ':utils', ':utils:repos', ':utils:repos:common', ':utils:repos:exposed', ':exposed', ':exposed:commons', ':ktor', ':ktor:common', ':ktor:client', ':core', ':core:api', ':core:exposed', ':core:ktor', ':core:ktor:common', ':core:ktor:client', ':publishing', ':publishing:api', ':publishing:exposed', ':markups', ':markups:html' ] includes.each { include it ProjectDescriptor project = project(it) println(project.projectDir.absolutePath.replace(rootDir.absolutePath, "")) project.name = rootProject.name + project.projectDir.absolutePath.replace(rootDir.absolutePath, "").replace("/", ".") }