From 59cd0577a13262ac67d83bea768ee6422ce0e3b2 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Tue, 28 Oct 2025 12:32:00 +0100 Subject: [PATCH] refactor(distribution): Remove validation requiring distribution.enabled for updateSdkVariants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the check that prevented using updateSdkVariants when distribution.enabled is false. This allows users to embed the auto-update SDK in specific variants without requiring distribution uploads to be globally enabled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../io/sentry/android/gradle/AndroidComponentsConfig.kt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/plugin-build/src/main/kotlin/io/sentry/android/gradle/AndroidComponentsConfig.kt b/plugin-build/src/main/kotlin/io/sentry/android/gradle/AndroidComponentsConfig.kt index be4136c3c..ebcd1de78 100644 --- a/plugin-build/src/main/kotlin/io/sentry/android/gradle/AndroidComponentsConfig.kt +++ b/plugin-build/src/main/kotlin/io/sentry/android/gradle/AndroidComponentsConfig.kt @@ -76,15 +76,6 @@ fun ApplicationAndroidComponentsExtension.configure( "You cannot use the auto-update SDK in variants where the Sentry SDK is disabled." ) } - - // Check if updateSdkVariants is set but distribution uploads are disabled - val distributionEnabled = extension.distribution.enabled.get() - if (!distributionEnabled) { - throw IllegalArgumentException( - "Invalid configuration: updateSdkVariants contains variant '$variantName' but buildDistribution.enabled is false. " + - "It doesn't make sense to embed the auto-update SDK without uploading the build." - ) - } } if (isVariantAllowed(extension, variant.name, variant.flavorName, variant.buildType)) {