Thanks for your input! On Friday, January 23, 2015 at 7:39:51 PM UTC-8, Grunthos wrote: > > >> - I keep app projects in separate repositories and *I import my >> custom library modules* >> - >> *Importing a module creates a copy of the original * >> - This means *redundancy* and *code synchronization issues*. I may >> forget to merge back changes I've done to one of the library modules >> - Unfortunately this is the "official" solution provided by the >> IntelliJ IDEA documentation >> >> <https://www.jetbrains.com/idea/help/sharing-android-source-code-and-resources-using-library-projects.html#d806616e254> >> >> > Is this really so bad, or am I missing something? > > In eclipse I import library projects in their own tree and make changes > relating to different projects in different trees. When I view one set of > changes is valid/correct/complete, I comit them and import them into my > other projects and fix/check/pray as appropriate. I view it as much the > same process as incorporating patches from other people. I *assume* this > what the IntelliJ approach is...please correct me if I am wrong! > >
That's actually a very good point. I would deliberately allow redundancy to guarantee that a library works within an app project. As soon as the library is ready for prime time I can merge the changes back to the original repository and decide later if I need those changes in other app projects. It just makes the OCD part in me cringe a bit :-D > >> - I set up a *Maven repository for my library modules* and add the >> needed modules as dependencies to my app project >> - Very elegant, but... >> - Every single tiny change in my library code requires rebuilding >> and deploying the module. >> - I also fear that I need to increase the version code / build >> number every single time so the local Maven cache gets updated? I have >> no >> experience with this. :-/ >> >> Dunno. Don't know Maven, sadly. > I'm not sure but I believe this could probably be the ideal solution to satisfy my "OCD needs". I would have a central development repository for my library modules and add specific versions of them to my app projects. With Gradle it's just a matter of adding a dependency statement. That way I could also guarantee that my apps do not break when I make changes to my libraries without having to duplicate library code. It's just super cumbersome when I want to develop locally for a while. So I guess I'd start out the way you describe and have library modules as part of the app project. When the library is stable I could merge it back to the originating repository and create a release build for Maven and add that build version as a dependency to the app project. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

