[tor-commits] [orbot/master] proguard: disable obfuscation

n8fr8 at torproject.org n8fr8 at torproject.org
Thu Sep 13 16:56:13 UTC 2018


commit 749ca3ec8ce73c6809b38c1dc2b0c384be57773c
Author: Unpublished <unpublished at gmx.net>
Date:   Wed Apr 4 17:41:53 2018 +0200

    proguard: disable obfuscation
    
    not needed since we are open source and reduces future incompatibilities
    
    - keep logTun2Socks callback
---
 app/build.gradle       | 4 ++--
 app/proguard-rules.txt | 8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/app/build.gradle b/app/build.gradle
index 7fd095b1..6642226e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -16,8 +16,8 @@ android {
     }
     buildTypes {
         release {
-            minifyEnabled false
-            shrinkResources false
+            minifyEnabled true
+            shrinkResources true
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
         }
     }
diff --git a/app/proguard-rules.txt b/app/proguard-rules.txt
index bc4eb0c1..b1120f82 100644
--- a/app/proguard-rules.txt
+++ b/app/proguard-rules.txt
@@ -1,3 +1,11 @@
+-dontobfuscate
+# https://stackoverflow.com/questions/9651703/using-proguard-with-android-without-obfuscation
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable
+
+-keep class org.torproject.android.service.vpn.Tun2Socks {
+    void logTun2Socks(java.lang.String, java.lang.String, java.lang.String);
+}
+
 -keepattributes Signature
 -keepattributes Annotation
 -keep class okhttp3.** { *; }





More information about the tor-commits mailing list