Skip to content

Instantly share code, notes, and snippets.

View nagypet's full-sized avatar

Peter Nagy nagypet

View GitHub Profile
@moksamedia
moksamedia / gist:5475917
Created April 28, 2013 04:45
Gradle: to automatically discover subprojects and include them in your root project, put this in your settings.gradle file
/*
* Here we iterate over the directories found in the root directory of the
* main project, and if the subdirectory contains a build.gradle file, it
* is added to the main project as a subproject.
*/
Closure discoverSubprojects = {
def list = []
rootDir.eachDir(){ dir ->
dir.eachFileMatch({it == 'build.gradle'}, { list += [dir.name] })