ProGuard Configuration for Stable Operation of GraphHopper Map Matching in Android App

Hi everyone,

I am currently facing challenges in configuring ProGuard for the com.graphhopper:graphhopper-map-matching:5.3 module within my Android app. I have encountered occasional crashes, even after applying commonly suggested ProGuard rules.

Initially, I added the following rules to my ProGuard configuration, based on suggestions I found:
-keep class com.graphhopper.** { *; }

This proved insufficient, and after further investigation, I found that an additional exclusion is necessary for a related package:
-keep class com.carrotsearch.** { *; }

Although this resolved the majority of issues, I still encounter rare crashes, and the following exception is reported:

Fatal Exception: java.lang.NoClassDefFoundError: y7.g
       at com.graphhopper.GraphHopper.buildEncodingManager(GraphHopper.java:186)
       at com.graphhopper.GraphHopper.init(GraphHopper.java:351)

To ensure a more robust configuration, I ran a dependency tree check on the entire module and considered excluding all dependencies with the following rules:

-keep class com.graphhopper.** { *; }
-keep class com.carrotsearch.** { *; }
-keep class org.locationtech.jts.** { *; }
-keep class com.fasterxml.jackson.** { *; }
-keep class org.codehaus.janino.** { *; }
-keep class org.apache.xmlgraphics.** { *; }
-keep class org.openstreetmap.osmosis.** { *; }
-keep class org.slf4j.** { *; }
-keep class com.google.protobuf.** { *; }

While this approach appears to work, it is overly permissive, and I am seeking advice on a more targeted ProGuard configuration. Has anyone successfully configured the graphhopper-map-matching module for Android without encountering crashes? Alternatively, could someone provide insight into which packages are strictly necessary for the proper functioning of this module in an Android environment?