feat(gradle-plugin): upload native debug symbols via symbol-sets upload - #660
Draft
cat-ph wants to merge 1 commit into
Draft
feat(gradle-plugin): upload native debug symbols via symbol-sets upload#660cat-ph wants to merge 1 commit into
cat-ph wants to merge 1 commit into
Conversation
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Native crash capture (#659) needs the app's
.sodebug symbols uploaded at build time, the same way the plugin already uploads ProGuard mappings. This registers anuploadPostHogNativeSymbols<Variant>task that pointsposthog-cli symbol-sets upload(>= 0.7.32) at the variant's merged native libs intermediates: the unstripped libraries as built, before AGP strips them for packaging. The CLI scans the directory, uploads every library carrying debug info and a GNU build id, and triages the rest with guidance.Wiring choices:
assemble/install/bundleonly when the app module builds native code itself (externalNativeBuildconfigured). Apps that only bundle prebuilt.sofiles from dependencies can run the task explicitly; auto-uploading for every app with any bundled.so(e.g. every React Native app) felt too surprising for a first release.onlyIfwhen the variant has no.sofiles at all.PostHogCliExecTask), sotasks.withType<PostHogCliExecTask>configuration applies to it like the mapping upload.💚 How did you test it?
./gradlew -p posthog-android-gradle-plugin buildgreen on a remote linux box (the plugin has no test suite today; the task follows the existingPostHogUploadProguardMappingsTaskstructure).📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file