jberkel/android-plugin — pull request #73 by appamatto (2011-10-14 23:40:54+00:00)
Title: Support for library projects.

Using the --non-constant-id option to aapt we make sure that the
library projects' ids are not inlined by the compiler.
Unfortunately we need to several R.java files, each identical but with
different packages, since the library projects will be looking for them there.

Thanks to rst--this code is based on his but uses a different method.

You need to set isLibraryProject in Android := true for all of the library projects. Only direct dependencies are included, but it is now safe to flatten your dependency tree because all of the compilation occurs in the parent project.