Skip to content

Commit a2f52c7

Browse files
committed
2.2.1
1 parent 4e4576a commit a2f52c7

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
**注意2.x.x 不兼容 1.x.x**
2121

2222
```groovy
23-
compile 'ren.yale.android:cachewebviewlib:2.1.8'
23+
implementation 'ren.yale.android:cachewebviewlib:2.2.1'
2424
```
2525

2626
### 修改代码
@@ -239,6 +239,7 @@ public class WebResourceResponseAdapter extends com.tencent.smtt.export.external
239239
WebViewCacheInterceptor.Builder builder = new WebViewCacheInterceptor.Builder(this);
240240

241241
builder.setCachePath(new File(this.getCacheDir(),"cache_path_name"))//设置缓存路径,默认getCacheDir,名称CacheWebViewCache
242+
.setDynamicCachePath(new File(this.getCacheDir(),"dynamic_webview_cache"))
242243
.setCacheSize(1024*1024*100)//设置缓存大小,默认100M
243244
.setConnectTimeoutSecond(20)//设置http请求链接超时,默认20秒
244245
.setReadTimeoutSecond(20)//设置http请求链接读取超时,默认20秒

Diff for: README_EN.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
### use lib
1717

1818
```groovy
19-
compile 'ren.yale.android:cachewebviewlib:2.1.8'
19+
implementation 'ren.yale.android:cachewebviewlib:2.2.1'
2020
```
2121

2222

@@ -103,6 +103,7 @@ when call `mWebView.loadUrl(url)` replace by `WebViewCacheInterceptorInst.getIns
103103
WebViewCacheInterceptor.Builder builder = new WebViewCacheInterceptor.Builder(this);
104104

105105
builder.setCachePath(new File(this.getCacheDir(),"cache_path_name"))//set cache path, default getCacheDir, name CacheWebViewCache
106+
.setDynamicCachePath(new File(this.getCacheDir(),"dynamic_webview_cache"))
106107
.setCacheSize(1024*1024*100)//set cache size, default 100M
107108
.setConnectTimeoutSecond(20)//set http connect timeou,default 20 seconds
108109
.setReadTimeoutSecond(20)//set http read timeout,default 20 seconds

Diff for: cachewebviewlib/config/bintray.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'com.jfrog.bintray'
44

55

6-
version = '2.1.8'
6+
version = '2.2.1'
77

88
repositories {
99
jcenter()

Diff for: cachewebviewlib/src/main/java/ren/yale/android/cachewebviewlib/DynamicCacheLoader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ren.yale.android.cachewebviewlib.utils;
1+
package ren.yale.android.cachewebviewlib;
22

33
import java.io.File;
44
import java.net.MalformedURLException;

Diff for: cachewebviewlib/src/main/java/ren/yale/android/cachewebviewlib/WebViewCacheInterceptor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import okhttp3.Request;
3131
import okhttp3.Response;
3232
import ren.yale.android.cachewebviewlib.config.CacheExtensionConfig;
33-
import ren.yale.android.cachewebviewlib.utils.DynamicCacheLoader;
33+
import ren.yale.android.cachewebviewlib.DynamicCacheLoader;
3434
import ren.yale.android.cachewebviewlib.utils.FileUtil;
3535
import ren.yale.android.cachewebviewlib.utils.MimeTypeMapUtils;
3636
import ren.yale.android.cachewebviewlib.utils.NetUtils;

0 commit comments

Comments
 (0)