prevent R8 shrinking from removing Tor’s private JNI fields
This commit is contained in:
@@ -56,6 +56,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 24
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
####################################################################################################
|
||||
# tor-android JNI
|
||||
####################################################################################################
|
||||
|
||||
# libtor accesses these fields and native methods by their Java names/signatures.
|
||||
# Release R8 shrinking can otherwise remove private fields that are only used from JNI.
|
||||
-keep class org.torproject.jni.TorService {
|
||||
long torConfiguration;
|
||||
int torControlFd;
|
||||
native <methods>;
|
||||
}
|
||||
Reference in New Issue
Block a user