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 11# Changelog  
22
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+ 
38## 0.17.1  
49
510### Fixes  
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
183183	public final fun getFailedRequestTargets ()Ljava/util/List;
184184	public final fun getMaxAttachmentSize ()J
185185	public final fun getMaxBreadcrumbs ()I
186+ 	public final fun getProguardUuid ()Ljava/lang/String;
186187	public final fun getRelease ()Ljava/lang/String;
187188	public final fun getSampleRate ()Ljava/lang/Double;
188189	public final fun getSdk ()Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;
@@ -213,6 +214,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
213214	public final fun setFailedRequestTargets (Ljava/util/List;)V
214215	public final fun setMaxAttachmentSize (J)V
215216	public final fun setMaxBreadcrumbs (I)V
217+ 	public final fun setProguardUuid (Ljava/lang/String;)V
216218	public final fun setRelease (Ljava/lang/String;)V
217219	public final fun setSampleRate (Ljava/lang/Double;)V
218220	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 {
180180	public final fun getFailedRequestTargets ()Ljava/util/List;
181181	public final fun getMaxAttachmentSize ()J
182182	public final fun getMaxBreadcrumbs ()I
183+ 	public final fun getProguardUuid ()Ljava/lang/String;
183184	public final fun getRelease ()Ljava/lang/String;
184185	public final fun getSampleRate ()Ljava/lang/Double;
185186	public final fun getSdk ()Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;
@@ -210,6 +211,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
210211	public final fun setFailedRequestTargets (Ljava/util/List;)V
211212	public final fun setMaxAttachmentSize (J)V
212213	public final fun setMaxBreadcrumbs (I)V
214+ 	public final fun setProguardUuid (Ljava/lang/String;)V
213215	public final fun setRelease (Ljava/lang/String;)V
214216	public final fun setSampleRate (Ljava/lang/Double;)V
215217	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
2020    androidOptions.isAnrEnabled =  kmpOptions.isAnrEnabled
2121    androidOptions.anrTimeoutIntervalMillis =  kmpOptions.anrTimeoutIntervalMillis
2222
23+     kmpOptions.proguardUuid?.let  { uuid -> 
24+         androidOptions.proguardUuid =  uuid
25+     }
26+ 
2327    //  Replay options
2428    androidOptions.sessionReplay.maskAllText = 
2529        kmpOptions.sessionReplay.maskAllText
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ actual interface PlatformOptions : CommonPlatformOptions {
1515    val  attachScreenshot:  Boolean 
1616    val  attachViewHierarchy:  Boolean 
1717    val  sessionReplay:  AndroidSentryReplayOptions 
18+     val  proguardUuid:  String? 
1819}
1920
2021class  SentryAndroidOptionsWrapper (private  val  androidOptions :  SentryAndroidOptions ) :
@@ -76,6 +77,9 @@ class SentryAndroidOptionsWrapper(private val androidOptions: SentryAndroidOptio
7677    override  val  sendDefaultPii:  Boolean 
7778        get() =  androidOptions.isSendDefaultPii
7879
80+     override  val  proguardUuid:  String? 
81+         get() =  androidOptions.proguardUuid
82+ 
7983    override  fun  applyFromOptions (options :  SentryOptions ) {
8084        options.toAndroidSentryOptionsCallback().invoke(androidOptions)
8185    }
@@ -113,6 +117,7 @@ actual fun PlatformOptions.assertPlatformSpecificOptions(kmpOptions: SentryOptio
113117        kmpReplayOptions.sessionSampleRate
114118    )
115119    assertEquals(androidOptions.sessionReplay.quality.name, kmpReplayOptions.quality.name)
120+     assertEquals(androidOptions.proguardUuid, kmpOptions.proguardUuid)
116121}
117122
118123actual  fun  createSentryPlatformOptionsConfiguration (): PlatformOptionsConfiguration  =  {
Original file line number Diff line number Diff line change @@ -213,6 +213,20 @@ public open class SentryOptions {
213213    public  var  experimental:  ExperimentalOptions  =  ExperimentalOptions ()
214214        private  set
215215
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+ 
216230    /* *
217231     * Experimental options for new features, these options are going to be promoted to SentryOptions 
218232     * before GA. 
Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ class SentryOptionsTest : BaseSentryTest() {
134134        assertEquals(SentryReplayOptions .Quality .MEDIUM , options.sessionReplay.quality)
135135        assertTrue(options.enableWatchdogTerminationTracking)
136136        assertFalse(options.sendDefaultPii)
137+         assertNull(options.proguardUuid)
137138    }
138139
139140    @Test
@@ -165,6 +166,7 @@ class SentryOptionsTest : BaseSentryTest() {
165166            sessionReplay.maskAllImages =  false 
166167            sessionReplay.quality =  SentryReplayOptions .Quality .LOW 
167168            sendDefaultPii =  true 
169+             proguardUuid =  " test-proguard-uuid-12345" 
168170        }
169171
170172        val  platformOptions =  createPlatformOptions()
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments