Interesting post, I find myself in a similar posiion re libraries and, more 
generally, in trying to find realistic "best practice" guides.

On Saturday, January 24, 2015 at 5:07:58 AM UTC+11, Nobu Games wrote:
>
>
>    - *I use only a single massive repository *that is basically an 
>    Android Studio project that hosts all my Android app modules and custom 
>    library modules
>       - This is not going to happen
>       
> I agree.


>    - 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!

 

>
>    - I keep app projects in separate repositories and *check out my 
>    library modules from a separate repository as a Git submodule 
>    <http://git-scm.com/book/en/v2/Git-Tools-Submodules>*
>       - I *cannot cherry-pick the needed library modules* from the Git 
>       repository. Git submodule checks out the whole library repository
>       - It does not play nicely with that one level deep project/module 
>       directory structure for Android Studio projects
>    
>
I've never been very fond of the git submodule approach, so yes: I agree. 
In Eclipse when I use a library I typically create tags in case I need to 
restore the exact version as built.
 

>
>    - 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.
 

>
>    - 
>       
>

-- 
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.

Reply via email to