-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Randomizing mapping_file_id for each build prevents gradle build cache #2 #6000
Comments
I found a few problems with this issue:
|
Hi @lamphamTL, thank you for reaching out. I was able to reproduce the issue using the latest Crashlytics plugin 3.0.1. I'll notify our engineers and get back to you. Thanks! |
@lamphamTL this is an unfortunate side effect of the way Crashlytics works. I did attempt to make the task smarter, and not generate a new mapping file id when the app source didn't change. But this created other issues, so we were forced to revert it. I would like to fix this, but since it is not a regression it's not a high priority right now. During development, if your builds have obfuscation or mapping file upload disabled, then the task will cache properly because it will generate a mapping file id of 0. Only builds with obfuscation will cause this. Would this be ok for your use case? Or is there a reason you want to repeatedly build release builds? If I understand your use case better I might be able to offer some workaround to mitigate the issue. |
hey @mrober, I have few questions |
hey @mrober 👋 |
Hi @lamphamTL we create the mapping file id early because we inject it into the app as an Android resource. We did try doing this later in the build process, but that creates a circular dependency on any other Gradle plugin that requires the Android resources as input to generate code. This also means we cannot do it after the mapping file has been generated. We have considered other methods to pass the mapping file id into the app, but changing this would make a complicated compatibility chart between versions of the Gradle plugin and versions of the SDK. This has come up a couple times now so it is on my radar, but I cannot promise any timeline unfortunately. And this will likely be gated behind a property for a long time due to the compatibility issue. |
@mrober Thanks for the explanation, very clear. |
That is a nice idea, I will consider providing a way to support manually managing the mapping file id. Just be very careful you don't overwrite mapping files by uploading a new file with the same id, or fail to upload a new file because the id didn't change. Using the app version will not work well for this because you might have another engineer hit "run" in Android Studio, and clobber your uploaded mapping file. |
yeah, we will only intercept this value for builds that we don't need crashlytics (PR compilation checks, unit tests etc.., and we have a specific app version format for these builds) |
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
This is a follow up issue of the previous one which has been locked by the bot.
I've tried the version 3.0.1 as suggested here but the task
InjectMappingFileIdTask
keeps generating a brand newmapping_file_id
with the same input sources.Steps to reproduce:
Same steps as here
The text was updated successfully, but these errors were encountered: