Last active
August 29, 2015 14:28
-
-
Save Jacoby6000/d2dc1c329acd19f532e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def collectSubAar(ps: Seq[ProjectRef]): Seq[AarLibrary] = ps flatMap { p => | |
val locals = Project.runTask(libraryProjects in(p, Android), st).collect { | |
case (_, Value(value)) => value | |
} | |
val aarlibs = locals.fold(Seq.empty[AarLibrary])(_ collect { | |
case a: AarLibrary => a | |
}) | |
val sub = Project.getProject(p, struct) | |
if(sub.isEmpty) aarlibs | |
else aarlibs ++ sub.fold(Seq.empty[AarLibrary])(s => collectSubAar(s.dependencies.map(_.project))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment