

Id '.crets-gradle-plugin' version '2.0.1' apply false In Android Studio, open your project-level adle file and add the followingĬode to the dependencies element under buildscript.Must appear before any other statements in the script. In your top-level adle file, include the.To install the Secrets Gradle Plugin for Android in your Google Maps project: 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.
