Skip to content

Instantly share code, notes, and snippets.

@mtrung
Created June 17, 2015 22:12
Show Gist options
  • Save mtrung/76b3c1cf58e21b0cbdb4 to your computer and use it in GitHub Desktop.
Save mtrung/76b3c1cf58e21b0cbdb4 to your computer and use it in GitHub Desktop.
Gradle/Groovy script to include external modules for Android Studio
// ...include external modules
def extModuleDir = '../shared_modules'
def moduleList = ['mod1', 'mod2']
for (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()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment