Skip to content
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

Support multi-module Android projects when sending Source Context #685

Open
wzieba opened this issue Mar 28, 2024 · 3 comments
Open

Support multi-module Android projects when sending Source Context #685

wzieba opened this issue Mar 28, 2024 · 3 comments
Labels
enhancement New feature or request Platform: Android

Comments

@wzieba
Copy link

wzieba commented Mar 28, 2024

Problem Statement

When sending Source Context via Sentry Gradle Plugin, I've noticed that the source is taken only from the main application module. This is problematic for multi-module setups, which are fairly common.

I've prepared a minimal reproduction project of what I have in mind.

Reproduction

An Android application with x app module and y its dependency: https://github.com/wzieba/SentrySourceContextMultiModule

Expected behavior

Running assembleRelease prepares source context bundle with all classes from x and all classes from y modules.

Current behavior

Running assembleRelease prepares source context bundle with only classes from x (proof: https://github.com/wzieba/SentrySourceContextMultiModule/actions/runs/8467510900/job/23198486580#step:5:20)

Solution Brainstorm

I think it could be addressed manually with additionalSourceDirsForSourceContext, but I haven't prepared a working solution yet. Ideally, It'd be great if SAGP could do this internally (maybe as a non-default option?).

@kahest
Copy link
Member

kahest commented Apr 3, 2024

Hey @wzieba thanks for the suggestion, I think this makes sense, but it's not our top priority at the moment

@markushi
Copy link
Member

markushi commented Apr 3, 2024

Let's investigate this first on our end, as in theory it should work:

  1. Apply plugin to library modules as well (and disable all other plugin features)
  2. Manually upload source context via gradle
  3. Verify asset merging combines all bundle IDs
  4. Ensure app sends proper bundle IDs

@markushi markushi self-assigned this Apr 3, 2024
@romtsn
Copy link
Member

romtsn commented Apr 4, 2024

The end goal would be for our gradle plugin to support applying on the root project level, so then we could have access to all modules, but this is a bit bigger initiative

@markushi markushi removed their assignment May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Platform: Android
Projects
Status: No status
Status: Backlog
Development

No branches or pull requests

4 participants