Closed friederbluemle closed 8 years ago
Thanks for your big update. This really refresh the project.
For the review, I have one thing to discuss about :
https://github.com/vincentbrison/vb-android-app-quality/pull/19/commits/50300dccae239dcd720a76144a8779c0c2ea2ded : I am not sure using plain string to check the flavor
is the best solution since it wont support refactoring for example, but it certainly produce less code than my solution using an enum. What do you think about that @friederbluemle ?
BR.
@vincentbrison That's a good point! I don't really like the string comparison either. I guess the "correct" way to solve this is to move the unit test to a flavor specific folder, so that it'll automatically only run in the right configuration (without an explicit check). Let me look into that now.
Oh, I also updated this to the latest Gradle plugin 2.2.0
and updated Gradle wrapper to 3.1
. Now fully compatible with the latest stable Android Studio 2.2 just released a couple of days ago.
http://tools.android.com/recent/androidstudio22andemulator2522arestable
The project builds a lot faster now (with Gradle 3.1 and dex running in process).
Okay, so going through the code I concluded that the underlying issue was due to the fact that max
(or maxDigits
) in the calcPiDigits
method had a different meaning based on what flavor was selected:
approximationPi
: iterations
daggerMockedPi
: no meaning
exactPi
: digits
mockWebServerPi
: no meaning
I made this meaning explicit by introducing a new enum called CalculationMethod
in PiGenerator
. At the same time I rewrote the unit test, and got rid of the string comparison/flavor check altogether. Let me know what you think.
Build tools 24.0.3
is now available. I just edited the Update Android build components
commit to include this latest version as well.
Thanks ! I will look into that :)
Ok I messing up with the new code review interface. I will let you know when I am done.
I only have one little comment about jvmargs, however, then I will merge it. Thanks for your hard work.
This updates all dependencies to the latest versions, including all Android build dependencies. Also included are other minor fixes and improvements.
@vincentbrison Let me know if you want me squash some commits and/or open separate pull requests for easier review. I think if you go through the commits one-by-one it's easiest to review. Every single commit is a logical step in the process of me making all the updates - They are sorted chronologically and result in a buildable project.