From 0c6baba0998ef92f17408b9ce5d71cdb21d46541 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Thu, 15 Aug 2024 17:17:52 +0800 Subject: [PATCH] Fix(Tool): Fixed the bug of being unable to load stores and tools after compiling to release --- app/proguard-rules.pro | 5 +++++ .../kotlin/top/fatweb/oxygen/toolbox/di/NetworkModule.kt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index c872c8b..a36db37 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -17,6 +17,11 @@ ; } +# Keep SerialName annotation +-keepclassmembers class * { + @kotlinx.serialization.SerialName ; +} + # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable diff --git a/app/src/main/kotlin/top/fatweb/oxygen/toolbox/di/NetworkModule.kt b/app/src/main/kotlin/top/fatweb/oxygen/toolbox/di/NetworkModule.kt index 16ca519..9368989 100644 --- a/app/src/main/kotlin/top/fatweb/oxygen/toolbox/di/NetworkModule.kt +++ b/app/src/main/kotlin/top/fatweb/oxygen/toolbox/di/NetworkModule.kt @@ -30,7 +30,7 @@ internal object NetworkModule { HttpLoggingInterceptor() .apply { if (BuildConfig.DEBUG) { - setLevel(HttpLoggingInterceptor.Level.BODY) + level = HttpLoggingInterceptor.Level.BODY } } )