Ver Fonte

提交2.0.3版本,将android support转成androidx支持,并将Maven库存放到个人服务器上

yanyi há 4 anos atrás
pai
commit
bbf3368ea0

+ 5 - 4
README.md

@@ -1,6 +1,6 @@
 # BaseOkHttp
 
-![](https://img.shields.io/badge/okhttplib-2.0.3-green)
+![](https://img.shields.io/badge/okhttplib-2.0.4-green)
 
 
 OkHttp请求封装
@@ -11,13 +11,13 @@ OkHttp请求封装
 ~~~
 repositories {
         maven {
-            url "http://maven.yanyi.online:8081/nexus/content/repositories/mylove/"
+            url "http://maven.benyanyi.com:8081/nexus/content/repositories/mylove/"
         }
     }
 ~~~
 ### module 下添加
 ~~~
-implementation 'com.yanyi.benyanyi:okhttplib:2.0.3'
+implementation 'com.yanyi.benyanyi:okhttplib:2.0.4'
 ~~~
 
 或者
@@ -25,12 +25,13 @@ implementation 'com.yanyi.benyanyi:okhttplib:2.0.3'
 <dependency>
   <groupId>com.yanyi.benyanyi</groupId>
   <artifactId>okhttplib</artifactId>
-  <version>2.0.3</version>
+  <version>2.0.4</version>
   <type>aar</type>
 </dependency>
 ~~~
 
 ### 更新记录
+* 2020-05-16(2.0.4) 修复上传大文件时OOM问题
 * 2020-05-16(2.0.3) 将android support转成androidx支持,并将Maven库存放到个人服务器上
 * 2020-01-16(2.0.2) 修复解析崩溃问题,优化返回方法
 * 2019-08-26(2.0.1) 优化下载

+ 1 - 1
okhttplib/bintrayUpload.gradle

@@ -25,4 +25,4 @@ uploadArchives {
         }
     }
 }
-//gradlew bintrayUpload    terminal中输入
+//gradlew uploadArchives    terminal中输入

+ 2 - 2
okhttplib/src/main/java/com/benyanyi/okhttp/type/HttpConfig.java

@@ -24,13 +24,13 @@ class HttpConfig {
                 public void log(@NonNull String message) {
                     OkHttpLog.d(message);
                 }
-            }).setLevel(HttpLoggingInterceptor.Level.BODY);
+            }).setLevel(HttpLoggingInterceptor.Level.HEADERS);
 
     /**
      * 设置缓存路径,以及缓存文件大小
      */
     static okhttp3.Cache privateCache(Context mContext) {
-        return new okhttp3.Cache(mContext.getCacheDir(), 1024 * 1024);
+        return new okhttp3.Cache(mContext.getCacheDir(), 10240 * 10240);
     }
 //    fun verifier(): HostnameVerifier
 //