What happened last week: 01
A regular android developer log
- I recently started to use Truth over AssertJ. One of the reason is that I cannot use AssertJ version 2.0 and above in android projects due to transitive dependencies issue.
- Difference between Compiler vs Transpiling
- We started to use “dependencies” in root build.gradle approach. I liked it. I also updated some of my libraries with this approach. The idea came from Butterknife. One of the advantages is to use them among all modules.
ext.deps = [
junit : 'junit:junit:4.12',
truth : 'com.google.truth:truth:0.28',
- We removed the restriction of one line rule for if-else conditions. I feel more comfortable with one line for some situations. The more compact the better. The eyes get used to it fairly fast.
if (something) return true; // OK
if (something) // Still bad, should use curly braces
- Android emulator doesn’t support Play Services 9.2.0 yet. Therefore we had to stick with 9.0.2 version. Here is the submitted issue https://goo.gl/mOQit5
- Article about our documentation first development which we apply in our team. https://t.co/puh1vhKNHN
- There is an easy way to get keystore information, especially for debug.keystore. Usually you need sha1 info for many reasons.
$ ./gradlew signingReport
Notes in general
- In the early days of unit testing, I used to test package-private methods as well. We completely stopped this approach and abandoned it. We only test the behavior of public API. Other methods are implementation details and should be tested through public API.
- For the new project we are using MVP and we are quite happy about it. We have adjusted it quite a lot. I’ll mention about these changes on the next logs.