Where to put `sentry.properties` file in Android Studio project?

I found out that sentry.properties file should be placed in the root directory of the app.

  • For example if I have setup my project in XYZ folder then put sentry.properties in the same folder (its a same directory where you find AppName.iml, gradle.properties etc etc)

There are in fact two different sentry.properties files.

  1. The sentry.properties that is used by the app at runtime to configure the DSN should be placed at /app/src/main/resources (documentation).

  2. The sentry.properties that is used at build time by Gradle to generate and upload ProGuard mappings to Sentry. This should be placed in the project root. (documentation). This is optional and only relevant for apps that use ProGuard.

Tags:

Android

Sentry