Skip to content

Commit 7e8d06b

Browse files
runningcodeclaude
andcommitted
Fix R8 minification failure with consumer ProGuard rule for DistributionIntegration
Added consumer ProGuard rule in sentry-android-core to handle missing DistributionIntegration class when the distribution module is not included. This follows the same pattern used for other optional integrations like Replay and Timber. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f5bc2bc commit 7e8d06b

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

sentry-android-core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ dependencies {
7676
compileOnly(projects.sentryAndroidFragment)
7777
compileOnly(projects.sentryAndroidTimber)
7878
compileOnly(projects.sentryAndroidReplay)
79-
compileOnly(projects.sentryAndroidDistribution)
8079
compileOnly(projects.sentryCompose)
80+
compileOnly(projects.sentryAndroidDistribution)
8181

8282
// lifecycle processor, session tracking
8383
implementation(libs.androidx.lifecycle.common.java8)

sentry-android-core/proguard-rules.pro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,8 @@
7878
-dontwarn io.sentry.android.replay.DefaultReplayBreadcrumbConverter
7979
-keepnames class io.sentry.android.replay.ReplayIntegration
8080
##---------------End: proguard configuration for sentry-android-replay ----------
81+
82+
##---------------Begin: proguard configuration for sentry-android-distribution ----------
83+
-dontwarn io.sentry.android.distribution.internal.DistributionIntegration
84+
-keepnames class io.sentry.android.distribution.internal.DistributionIntegration
85+
##---------------End: proguard configuration for sentry-android-distribution ----------

sentry-android-core/src/main/java/io/sentry/android/core/AndroidOptionsInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
import io.sentry.android.core.internal.util.AndroidCurrentDateProvider;
3232
import io.sentry.android.core.internal.util.AndroidThreadChecker;
3333
import io.sentry.android.core.internal.util.SentryFrameMetricsCollector;
34-
import io.sentry.android.core.performance.AppStartMetrics;
3534
import io.sentry.android.distribution.internal.DistributionIntegration;
35+
import io.sentry.android.core.performance.AppStartMetrics;
3636
import io.sentry.android.fragment.FragmentLifecycleIntegration;
3737
import io.sentry.android.replay.DefaultReplayBreadcrumbConverter;
3838
import io.sentry.android.replay.ReplayIntegration;

0 commit comments

Comments
 (0)