Marc Reichelt
May 18, 2018 · 1 min read

Nice! If I might suggest some improvements:

  • This article is not limited to React Native. In fact, this is the exact method of how to sign standard Android APKs.
  • The code could be more readable in the signing config section — adding temporary values like ‘ANDROID_STORE_FILE_NOT_SET’ seems to defeat the purpose. I get it why you use findProperty instead of property — otherwise the Gradle sync would fail by default.

I would improve it by leveraging the fact that findProperty returns null. More importantly, I would fail the build when the signing config is missing by throwing a GradleException , because missing secrets should result in a build failure. You can find out how in this Gist. Hope this can improve your build process!

One more thing: Is your build time 8 minutes by default? If most of the time is spent on installing the Android SDK and downloading dependencies, you can improve your build time a lot by using this Docker image and activating a Gradle cache. I got it down to 2 minutes (including unit tests).

Marc Reichelt

Written by

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade