File tree Expand file tree Collapse file tree 7 files changed +34
-0
lines changed
sentry-kotlin-multiplatform
androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions
androidUnitTest/kotlin/io/sentry/kotlin/multiplatform
commonMain/kotlin/io/sentry/kotlin/multiplatform
commonTest/kotlin/io/sentry/kotlin/multiplatform Expand file tree Collapse file tree 7 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## Features
4
+
5
+ - Add ` proguardUuid ` option to ` SentryOptions ` ([ #436 ] ( https://github.com/getsentry/sentry-kotlin-multiplatform/pull/436 ) )
6
+ - This will propagate the ` proguardUuid ` value to Sentry Android
7
+
3
8
## 0.17.1
4
9
5
10
### Fixes
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
183
183
public final fun getFailedRequestTargets ()Ljava/util/List;
184
184
public final fun getMaxAttachmentSize ()J
185
185
public final fun getMaxBreadcrumbs ()I
186
+ public final fun getProguardUuid ()Ljava/lang/String;
186
187
public final fun getRelease ()Ljava/lang/String;
187
188
public final fun getSampleRate ()Ljava/lang/Double;
188
189
public final fun getSdk ()Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;
@@ -213,6 +214,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
213
214
public final fun setFailedRequestTargets (Ljava/util/List;)V
214
215
public final fun setMaxAttachmentSize (J)V
215
216
public final fun setMaxBreadcrumbs (I)V
217
+ public final fun setProguardUuid (Ljava/lang/String;)V
216
218
public final fun setRelease (Ljava/lang/String;)V
217
219
public final fun setSampleRate (Ljava/lang/Double;)V
218
220
public final fun setSdk (Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;)V
Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
180
180
public final fun getFailedRequestTargets ()Ljava/util/List;
181
181
public final fun getMaxAttachmentSize ()J
182
182
public final fun getMaxBreadcrumbs ()I
183
+ public final fun getProguardUuid ()Ljava/lang/String;
183
184
public final fun getRelease ()Ljava/lang/String;
184
185
public final fun getSampleRate ()Ljava/lang/Double;
185
186
public final fun getSdk ()Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;
@@ -210,6 +211,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
210
211
public final fun setFailedRequestTargets (Ljava/util/List;)V
211
212
public final fun setMaxAttachmentSize (J)V
212
213
public final fun setMaxBreadcrumbs (I)V
214
+ public final fun setProguardUuid (Ljava/lang/String;)V
213
215
public final fun setRelease (Ljava/lang/String;)V
214
216
public final fun setSampleRate (Ljava/lang/Double;)V
215
217
public final fun setSdk (Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;)V
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ internal fun SentryOptions.toAndroidSentryOptionsCallback(): (SentryAndroidOptio
20
20
androidOptions.isAnrEnabled = kmpOptions.isAnrEnabled
21
21
androidOptions.anrTimeoutIntervalMillis = kmpOptions.anrTimeoutIntervalMillis
22
22
23
+ kmpOptions.proguardUuid?.let { uuid ->
24
+ androidOptions.proguardUuid = uuid
25
+ }
26
+
23
27
// Replay options
24
28
androidOptions.sessionReplay.maskAllText =
25
29
kmpOptions.sessionReplay.maskAllText
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ actual interface PlatformOptions : CommonPlatformOptions {
15
15
val attachScreenshot: Boolean
16
16
val attachViewHierarchy: Boolean
17
17
val sessionReplay: AndroidSentryReplayOptions
18
+ val proguardUuid: String?
18
19
}
19
20
20
21
class SentryAndroidOptionsWrapper (private val androidOptions : SentryAndroidOptions ) :
@@ -76,6 +77,9 @@ class SentryAndroidOptionsWrapper(private val androidOptions: SentryAndroidOptio
76
77
override val sendDefaultPii: Boolean
77
78
get() = androidOptions.isSendDefaultPii
78
79
80
+ override val proguardUuid: String?
81
+ get() = androidOptions.proguardUuid
82
+
79
83
override fun applyFromOptions (options : SentryOptions ) {
80
84
options.toAndroidSentryOptionsCallback().invoke(androidOptions)
81
85
}
@@ -113,6 +117,7 @@ actual fun PlatformOptions.assertPlatformSpecificOptions(kmpOptions: SentryOptio
113
117
kmpReplayOptions.sessionSampleRate
114
118
)
115
119
assertEquals(androidOptions.sessionReplay.quality.name, kmpReplayOptions.quality.name)
120
+ assertEquals(androidOptions.proguardUuid, kmpOptions.proguardUuid)
116
121
}
117
122
118
123
actual fun createSentryPlatformOptionsConfiguration (): PlatformOptionsConfiguration = {
Original file line number Diff line number Diff line change @@ -213,6 +213,20 @@ public open class SentryOptions {
213
213
public var experimental: ExperimentalOptions = ExperimentalOptions ()
214
214
private set
215
215
216
+ /* *
217
+ * Sets the ProGuard UUID for the app. This option is used to match ProGuard/R8/DexGuard mapping
218
+ * files to your app. The UUID is typically generated automatically during the build process
219
+ * and included in the AndroidManifest.xml file.
220
+ *
221
+ * **Platform Availability**: Android only.
222
+ *
223
+ * On non-Android platforms, this option is ignored and has no effect.
224
+ *
225
+ * For more information on ProGuard mapping files and obfuscation, see:
226
+ * [ProGuard & DexGuard Documentation](https://docs.sentry.io/platforms/android/enhance-errors/proguard/)
227
+ */
228
+ public var proguardUuid: String? = null
229
+
216
230
/* *
217
231
* Experimental options for new features, these options are going to be promoted to SentryOptions
218
232
* before GA.
Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ class SentryOptionsTest : BaseSentryTest() {
134
134
assertEquals(SentryReplayOptions .Quality .MEDIUM , options.sessionReplay.quality)
135
135
assertTrue(options.enableWatchdogTerminationTracking)
136
136
assertFalse(options.sendDefaultPii)
137
+ assertNull(options.proguardUuid)
137
138
}
138
139
139
140
@Test
@@ -165,6 +166,7 @@ class SentryOptionsTest : BaseSentryTest() {
165
166
sessionReplay.maskAllImages = false
166
167
sessionReplay.quality = SentryReplayOptions .Quality .LOW
167
168
sendDefaultPii = true
169
+ proguardUuid = " test-proguard-uuid-12345"
168
170
}
169
171
170
172
val platformOptions = createPlatformOptions()
You can’t perform that action at this time.
0 commit comments