From 96fe90a2d185cbe610425c7f21f657a13cb4248c Mon Sep 17 00:00:00 2001 From: Aleksander Nowakowski Date: Mon, 6 Oct 2025 23:17:46 +0200 Subject: [PATCH] R8 configuration fixed for marshalling Preset values to/from XML --- app/proguard-rules.pro | 14 -------------- profile/module-rules.pro | 32 +++++++++++++------------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 6779d7fc..de8360ca 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,20 +1,6 @@ - -# Simple XML --dontwarn javax.xml.** - --keep public class org.simpleframework.**{ *; } --keep class org.simpleframework.xml.**{ *; } --keep class org.simpleframework.xml.core.**{ *; } --keep class org.simpleframework.xml.util.**{ *; } - -keepattributes Signature -keepattributes *Annotation* -# Ignore our XML Serialization classes --keep public class your.annotated.pojo.models.*{ - public protected private *; -} - # Crashlytics -keepattributes SourceFile,LineNumberTable # Keep file names and line numbers. -keep public class * extends java.lang.Exception # Optional: Keep custom exceptions. \ No newline at end of file diff --git a/profile/module-rules.pro b/profile/module-rules.pro index 481bb434..0e338136 100644 --- a/profile/module-rules.pro +++ b/profile/module-rules.pro @@ -1,21 +1,15 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html +# Simple XML +-dontwarn javax.xml.** -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} +-keep public class org.simpleframework.**{ *; } +-keep class org.simpleframework.xml.**{ *; } +-keep class org.simpleframework.xml.core.**{ *; } +-keep class org.simpleframework.xml.util.**{ *; } -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +# Ignore our XML Serialization classes +-keep public class no.nordicsemi.android.toolbox.profile.repository.uartXml.XmlConfiguration { + public protected private *; +} +-keep public class no.nordicsemi.android.toolbox.profile.repository.uartXml.XmlMacro { + public protected private *; +} \ No newline at end of file