From dbcb721dc21429c25aa164afb98dc3b91e19672b Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 25 Jul 2024 20:56:16 +0200 Subject: [PATCH] Don't warn about rhino class in proguard Likely related to https://github.com/mozilla/rhino/commit/01a7b20655602f7e2df59af744b47b77f678b6cf but I am not completely sure. I tested the app and it works well, so I think that org.mozilla.javascript.JavaToJSONConverters is not used really. This is the full list of errors: Missing class java.beans.BeanDescriptor (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) Missing class java.beans.BeanInfo (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) Missing class java.beans.IntrospectionException (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) Missing class java.beans.Introspector (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) Missing class java.beans.PropertyDescriptor (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) --- app/build.gradle | 3 +++ app/proguard-rules.pro | 1 + 2 files changed, 4 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 5706f1c4b..35cb8509e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,6 +56,9 @@ android { resValue "string", "app_name", "NewPipe " + System.getProperty('packageSuffix') archivesBaseName = 'NewPipe_' + System.getProperty('packageSuffix') } + applicationIdSuffix ".whatever" + resValue "string", "app_name", "NewPipe whatever" + archivesBaseName = 'NewPipe_whatever' minifyEnabled true shrinkResources false // disabled to fix F-Droid's reproducible build proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index d21f33e1f..435c4e29b 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -7,6 +7,7 @@ -keep class org.schabi.newpipe.extractor.timeago.patterns.** { *; } -keep class org.mozilla.javascript.** { *; } -keep class org.mozilla.classfile.ClassFileWriter +-dontwarn org.mozilla.javascript.JavaToJSONConverters -dontwarn org.mozilla.javascript.tools.** ## Rules for ExoPlayer