Skip to content

Commit cf16fb0

Browse files
runningcodeclaude
andcommitted
feat(android-distribution): Use ProGuard UUID for build identification
Replace custom APK parsing with existing SDK infrastructure: - Use Sentry.getCurrentScopes().options.proguardUuid for build identification - Leverage automatic loading from sentry-debug-meta.properties or manifest - Better performance (no runtime APK parsing) - More reliable than signature extraction - Consistent with SDK patterns The ProGuard UUID provides a stable, unique identifier for each build and is automatically generated by sentry-cli or the Sentry Gradle plugin. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 77e6062 commit cf16fb0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

sentry-android-distribution/src/main/java/io/sentry/android/distribution/internal/DistributionInternal.kt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.sentry.android.distribution.internal
22

33
import android.content.Context
4+
import io.sentry.Sentry
45
import io.sentry.android.distribution.DistributionOptions
56
import io.sentry.android.distribution.UpdateStatus
67

@@ -19,10 +20,22 @@ internal object DistributionInternal {
1920
}
2021

2122
fun checkForUpdateBlocking(context: Context): UpdateStatus {
22-
return UpdateStatus.Error("Implementation coming in future PR")
23+
val buildIdentifier = Sentry.getCurrentScopes().options.proguardUuid
24+
return if (!buildIdentifier.isNullOrEmpty()) {
25+
UpdateStatus.Error(
26+
"Build identifier from ProGuard UUID: $buildIdentifier. HTTP client and API models coming in future PRs."
27+
)
28+
} else {
29+
UpdateStatus.Error(
30+
"No ProGuard UUID found. Ensure sentry-debug-meta.properties contains io.sentry.ProguardUuids or set via manifest."
31+
)
32+
}
2333
}
2434

2535
fun checkForUpdateAsync(context: Context, onResult: (UpdateStatus) -> Unit) {
26-
throw NotImplementedError()
36+
// For now, just call the blocking version and return the result
37+
// In future PRs, this will be truly async
38+
val result = checkForUpdateBlocking(context)
39+
onResult(result)
2740
}
2841
}

0 commit comments

Comments
 (0)