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

Enable source context for non-release buildtype #661

Open
Shadowsx3 opened this issue Feb 24, 2024 · 4 comments · May be fixed by #680
Open

Enable source context for non-release buildtype #661

Shadowsx3 opened this issue Feb 24, 2024 · 4 comments · May be fixed by #680
Labels
enhancement New feature or request Platform: Android

Comments

@Shadowsx3
Copy link

Shadowsx3 commented Feb 24, 2024

Problem Statement

Currently by setting the includeSourceContext option to true, only the build type of release type automatically reports the source context during the assemble task.
It would be great if other custom build types could have the ability to report it automatically by enabling the option.
The documentation did not specify this detail and this change would be a great help in a variety of projects.

Solution Brainstorm

There are places in the code that even if you enable the option to do so, check that specifically the name of the build type is release. We could change that as in the following example and depend on the user configuration.

Example

@romtsn
Copy link
Member

romtsn commented Feb 26, 2024

hi @Shadowsx3 that's a good feature request, thank you! The reason we limited this to only release builds is to not regress build speed for debug builds, but having this configurable with a list of supported build types makes a lot of sense, we'll look into implementing this!

@markushi
Copy link
Member

Let's make this configurable:

  • by default do it only for release builds
  • if configured, you can define all required buildTypes (~sentry { sourceContext { enabled: true|false, buildTypes: []}})

@RationalRank
Copy link

RationalRank commented Mar 11, 2024

As of now, the sentry AGP doesn't upload Source Context files if we use plugins like https://github.com/Triple-T/gradle-play-publisher. The task to build (and publish) an AAB using that plugin is ./gradlew :app:publishReleaseBundle

Since the task mentioned above is not identified as an assemble/bundle task by Sentry AGP, the Sentry plugin skips uploading sources.

What's the recommended approach if we would like to force sentry AGP to run the Source Context related tasks for tasks other than assemble/bundle?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Mar 11, 2024
@markushi
Copy link
Member

Hey @RationalRank, thanks for the additional feedback!

You could always run the upload task (e.g. ./gradlew :app:sentryUploadSourceBundleRelease) manually to upload sources.

@stefanosiano stefanosiano moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Mar 20, 2024
@markushi markushi linked a pull request Mar 26, 2024 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

4 participants