

The plugin then exposes those propertiesĪs variables in the Gradle-generated BuildConfig class and in the Android manifest file.įor a complete example of using the Secrets Gradle Plugin for Android to access an API key,ĭocumentation on GitHub for the latest system requirements and installation instructions. The Secrets Gradle Plugin for Android reads secrets, including the API key, fromĪ properties file not checked into a version control system.

Which is located in the root directory of your project and then use the Instead, you should store it in the local.properties file, Google strongly recommends that you not check an API key into your Prepare for Google Play data disclosure requirements.
