I recently open-sourced a tool called secrets-gradle-plugin — a Gradle plugin that allows you to pass secrets, such as API keys, securely into an Android app. While the plugin was originally developed for apps that use Google Maps Platform Android SDKs, the problem it solves is generic enough and can be applied to other third party libraries. It works by reading key-values from a secure properties file and exposes those values in two ways. First, as constants in your BuildConfig.java file, so your keys can be programmatically accessed, and second, as injected build variables in your AndroidManifest.xml file, so keys…

Chris Arriola

Developer Relations Engineer at Google | Author of: http://bit.ly/2rb27p0 & http://bit.ly/2O7to5u

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store