Skip to content

Instantly share code, notes, and snippets.

@mtrung
Created February 16, 2016 21:10
Show Gist options
  • Save mtrung/a12c760ee3eaceeaecbe to your computer and use it in GitHub Desktop.
Save mtrung/a12c760ee3eaceeaecbe to your computer and use it in GitHub Desktop.
include ':app'
def includeModules = { String extModuleDir, moduleList ->
// def extModuleDir = 'aw-common'
// def moduleList = ['wear-common', 'engine']
for (String moduleName in moduleList) {
def module = ":" + moduleName
include module
// ...must change projectDir for each module
project(module).projectDir = new File(extModuleDir, moduleName)
println "- include " + module + " path=" + project(module).projectDir.getPath()
}
}
def includeBrandModules = { String brandId ->
includeModules("aw-${brandId}", ["wear-${brandId}", "wear-faces-${brandId}"])
}
includeModules('aw-common', ['wear-common', 'engine'])
if (hasProperty("brand_id")) {
includeBrandModules("${brand_id}")
} else {
includeBrandModules('fs')
includeBrandModules('dev')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment