[android-developers] Re: Reusable code organization with Android Studio

2015-01-24 Thread Nobu Games
On Saturday, January 24, 2015 at 1:29:10 PM UTC-8, Doug wrote:

 Also, learn the semantics of what having -SNAPSHOT in a maven version 
 string means for referencing build artifacts from a repo.


Thanks for the pointer. That looks like the feature I was looking for.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Reusable code organization with Android Studio

2015-01-24 Thread Doug
You could use a local maven repo, then write yourself a convenience script 
that automatically builds and installs everything from wherever you like it 
to live.

Also, learn the semantics of what having -SNAPSHOT in a maven version 
string means for referencing build artifacts from a repo.

If you are the only one working on your app and all of its libraries, then 
just do whatever you want that's most convenient for you and don't worry 
about development conventions.  Just stick everything in one repo and take 
control of it yourself.  IMO conventions are mostly for teams that need to 
agree how collaborate well together.

Doug

On Friday, January 23, 2015 at 10:07:58 AM UTC-8, Nobu Games wrote:

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



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Debug Build Variants in Android Studio?

2015-01-24 Thread TreKing
On Wed, Jan 21, 2015 at 5:16 PM, Nathan nathan.d.mel...@gmail.com wrote:

 I can't see a way to debug the build variants, or even know if I am
 debugging the main or a variant.


Not entirely sure what you're asking, but there is a Build Variants tool
window that lets you flip the current build variant you're working in (and
hence running / debugging).
Mine's on the lower end of the left window dock. Also accessible by
View-Tool Windows-Build Variants.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Debug Build Variants in Android Studio?

2015-01-24 Thread Nathan


On Saturday, January 24, 2015 at 3:58:36 PM UTC-8, TreKing wrote:


 On Wed, Jan 21, 2015 at 5:16 PM, Nathan nathan@gmail.com 
 javascript: wrote:

 I can't see a way to debug the build variants, or even know if I am 
 debugging the main or a variant. 


 Not entirely sure what you're asking, but there is a Build Variants tool 
 window that lets you flip the current build variant you're working in (and 
 hence running / debugging).
 Mine's on the lower end of the left window dock. Also accessible by 
 View-Tool Windows-Build Variants.


That is what I was asking. I don't know my way around Android Studio much 
yet. I found the first one since I asked and the second way since your 
response. 

Nathan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Reusable code organization with Android Studio

2015-01-24 Thread Nobu Games
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.