drake 3 лет назад
Родитель
Сommit
471ce1d440
6 измененных файлов с 3 добавлено и 39 удалено
  1. 0 7
      README.md
  2. 0 7
      net/build.gradle
  3. 1 0
      net/consumer-rules.pro
  4. 0 21
      net/proguard-rules.pro
  5. 1 1
      sample/build.gradle
  6. 1 3
      sample/proguard-rules.pro

+ 0 - 7
README.md

@@ -111,13 +111,6 @@ implementation 'com.github.liangjingkanji:BRV:1.3.37'
 如果你是在 Android 5 (API level 21)以下开发, 要求使用OkHttp3.x请使用: [Net-okhttp3](https://github.com/liangjingkanji/Net-okhttp3)
 如果你是在 Android 5 (API level 21)以下开发, 要求使用OkHttp3.x请使用: [Net-okhttp3](https://github.com/liangjingkanji/Net-okhttp3)
 <br>
 <br>
 
 
-## 混淆规则
-
-```
--keep class okhttp3.** { *; }
-```
-
-
 ## Contribute
 ## Contribute
 
 
 <img src="https://tva1.sinaimg.cn/large/006tNbRwgy1gaskr305czj30u00wjtcz.jpg" width="100"/> 
 <img src="https://tva1.sinaimg.cn/large/006tNbRwgy1gaskr305czj30u00wjtcz.jpg" width="100"/> 

+ 0 - 7
net/build.gradle

@@ -34,13 +34,6 @@ android {
         consumerProguardFiles "consumer-rules.pro"
         consumerProguardFiles "consumer-rules.pro"
     }
     }
 
 
-    buildTypes {
-        release {
-            minifyEnabled false
-            proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
-        }
-    }
-
     kotlinOptions {
     kotlinOptions {
         freeCompilerArgs = ["-Xinline-classes", "-Xallow-result-return-type"]
         freeCompilerArgs = ["-Xinline-classes", "-Xallow-result-return-type"]
     }
     }

+ 1 - 0
net/consumer-rules.pro

@@ -0,0 +1 @@
+-keep class okhttp3.** { *; }

+ 0 - 21
net/proguard-rules.pro

@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the setKalle of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile

+ 1 - 1
sample/build.gradle

@@ -41,7 +41,7 @@ android {
     }
     }
     buildTypes {
     buildTypes {
         release {
         release {
-            minifyEnabled false
+            minifyEnabled true
             proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
             proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
         }
         }
     }
     }

+ 1 - 3
sample/proguard-rules.pro

@@ -18,6 +18,4 @@
 
 
 # If you keep the line number information, uncomment this to
 # If you keep the line number information, uncomment this to
 # hide the original source file name.
 # hide the original source file name.
-#-renamesourcefileattribute SourceFile
-
--keep class okhttp3.** {  }
+#-renamesourcefileattribute SourceFile