getsentry / sentry-android-gradle-plugin

Gradle plugin for Sentry Android. Upload proguard, debug files, and more.

Home Page:https://docs.sentry.io/platforms/android/gradle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upload source context also for `assemble${variantName}` tasks

krystofwoldrich opened this issue · comments

Description

Currently, the source context is only uploaded for bundle${variantName} tasks.

I think it would make sense to also upload the source context for the assemble task as they are used a lot for testing the app release locally. The Android crashes miss the source context for those test releases at the moment.

We actually already hook into assemble tasks here, but only for the release build type - did you perhaps test it with assembleDebug ?

@romtsn I've tried assembleRelease and bundleRelease tasks. I only see a hook to assemble task, I don't know if it exists in plain Android apps, bun in RN only assemble${variantName} exists.

get() = project.tasks.named("assemble", DefaultTask::class.java)

It's here

override val assembleProvider: TaskProvider<out Task>?
get() = (variant as? VariantImpl<*>)?.taskContainer?.assembleTask
. Which version of AGP you were testing on?

Android Gradle plugin 8.1.1 and SAGP 3.11.1 and 4.2.0 both have the same result.