1

I have included Crashlytics in my app and when I analyse my release APK, I see a crashylytics-build.properties file under the assets/ folder. This file is not in my local assets folder however. The file contents looks like this:

#This file is automatically generated by Crashlytics to uniquely
#identify individual builds of your Android application.
#
#Do NOT modify, delete, or commit to source control!
#
#Sun Oct 06 19:00:00 EDT 2019
version_name=1.0.0
package_name=com.example.app
build_id=fab45210-5052-3ab9-872d-9c67fcad894e1
version_code=1
app_name=Example app

Is this normal? Does Crashlytics requires this file to work? I'm a bit concerned since the file says it shouldn't be committed to VCS, so why should it be included in APK...

The file is also located in app\build\intermediates\merged_assets\debug\out\crashlytics-build.properties so it might be normal after all.

Nicolas
  • 6,611
  • 3
  • 29
  • 73

1 Answers1

1

This build.properties files is automatically generated by the Crashlytics SDK and is a necessary file to identify the unique build ID for your app. It is normal for that file to exist in your APK, however using an obfuscating tool such as Proguard or Dexguard to obfuscate your uniquely identifiable build would be recommended if you plan to distribute your app.

Oleg Kodysh
  • 986
  • 6
  • 13
  • Do you know how to obfuscate it with proguard? – Nicolas Oct 08 '19 at 15:29
  • I don't personally have too much experience with obfuscating a single file with Proguard, I have seen posts on it though. You could try taking a look [here](https://stackoverflow.com/questions/4830474/how-to-keep-exclude-a-particular-package-path-when-using-proguard). I would personally recommend obfuscating all of your source code however, versus just the build.properties file. – Oleg Kodysh Oct 08 '19 at 15:47
  • Are you sure about obsfucating it? If crashlytics needs it, it probably shouldn't be obfuscated... There's also no mention of it on the crashlytics page for configuring proguard. – Nicolas Oct 08 '19 at 15:51
  • As long as you're uploading your Proguard config mapping file after you obfuscate your code, your properties file should be readable. More documentation on how to set this up can be found [here](https://docs.fabric.io/android/crashlytics/dex-and-proguard.html). – Oleg Kodysh Oct 08 '19 at 18:04