From 6c5d58bed3a4e7945580c644a875aa1addf3a89b Mon Sep 17 00:00:00 2001 From: tobigr Date: Sun, 11 Jan 2026 18:56:41 +0100 Subject: [PATCH] Fix minify step of release build by ignoring two classes This fixes the following error during the minifyWithR8 task: > Task :app:minifyReleaseWithR8 FAILED ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /home/runner/work/NewPipe/NewPipe/app/build/outputs/mapping/release/missing_rules.txt. ERROR: R8: Missing class com.google.re2j.Matcher (referenced from: com.google.re2j.Matcher org.jsoup.helper.Re2jRegex$Re2jMatcher.delegate and 3 other contexts) Missing class com.google.re2j.Pattern (referenced from: com.google.re2j.Pattern org.jsoup.helper.Re2jRegex.re2jPattern and 4 other contexts) --- app/proguard-rules.pro | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 0cdffbe2e..8bcef3fbd 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -16,6 +16,11 @@ -dontwarn javax.script.** -keep class jdk.dynalink.** { *; } -dontwarn jdk.dynalink.** +# Rules for jsoup +# Ignore intended-to-be-optional re2j classes - only needed if using re2j for jsoup regex +# jsoup safely falls back to JDK regex if re2j not on classpath, but has concrete re2j refs +# See https://github.com/jhy/jsoup/issues/2459 - may be resolved in future, then this may be removed +-dontwarn com.google.re2j.** ## Rules for ExoPlayer -keep class com.google.android.exoplayer2.** { *; }