Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions mediapipe/java/com/google/mediapipe/framework/proguard.pgcfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
# Additional flags to pass to Proguard when processing a binary that uses
# MediaPipe.

# Keep public members of our public interfaces. This also prevents the
# obfuscation of the corresponding methods in classes implementing them,
# such as implementations of PacketCallback#process.
# Keep public members of our public interfaces.
-keep public interface com.google.mediapipe.framework.* {
public *;
}

# Keep process() on all callback implementations including lambda-desugared
# anonymous classes. R8 cannot see that these methods are invoked via JNI
# (graph.cc CallbackToJava) and will strip them, causing a fatal SIGABRT when
# GetMethodID fails at runtime. See #6045.
-keep class * implements com.google.mediapipe.framework.PacketCallback {
void process(com.google.mediapipe.framework.Packet);
}
-keep class * implements com.google.mediapipe.framework.PacketListCallback {
void process(java.util.List);
}
-keep class * implements com.google.mediapipe.framework.PacketWithHeaderCallback {
void process(com.google.mediapipe.framework.Packet, com.google.mediapipe.framework.Packet);
}

# This method is invoked by native code.
-keep public class com.google.mediapipe.framework.Packet {
public static *** create(***);
Expand Down