From 0c5f0d000f72cb4294c76bf46b59826536e82341 Mon Sep 17 00:00:00 2001 From: HUI Date: Mon, 13 Nov 2023 13:55:47 +0800 Subject: [PATCH] fix: proguard issue #739 --- android/build.gradle | 2 ++ android/consumer-rules.pro | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 android/consumer-rules.pro diff --git a/android/build.gradle b/android/build.gradle index 2e9e2583..bb90a21f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -87,6 +87,8 @@ android { buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null") + consumerProguardFiles 'consumer-rules.pro' + if (isNewArchitectureEnabled() && registrationCompat) { def reactAndroidProject = project(':ReactAndroid') externalNativeBuild { diff --git a/android/consumer-rules.pro b/android/consumer-rules.pro new file mode 100644 index 00000000..e7a2884c --- /dev/null +++ b/android/consumer-rules.pro @@ -0,0 +1,5 @@ +-keepattributes *Annotation* +-keep class kotlin.** { *; } +-keep class org.jetbrains.** { *; } + +-keep class io.agora.**{*;} \ No newline at end of file