import static java.util.Arrays.asList as asList
rootProject.name = 'HelloWorld'
asList("mherod/myrepo1", "mherod/myrepo2").each {
def name = it.split("/").last().toLowerCase()
"git submodule add https://github.com/${it}.git $name".execute().waitFor()
"git submodule update --init --recursive".execute().waitFor()
"git submodule update --remote --merge".execute().waitFor()
include name
project(":$name").projectDir = new File("./$name/")
}