提交 7c1fa16f 编写于 作者: J jackjintai

modify

[android]:优化数据mock接口遍历
上级 ed865568
......@@ -86,7 +86,7 @@ dokitExt {
//大图开关
bigImgSwitch true
//webView js 抓包
//webViewSwitch true
webViewSwitch true
}
slowMethod {
......@@ -97,7 +97,7 @@ dokitExt {
//调用栈函数入口
enterMethods = ["com.didichuxing.doraemondemo.MainDebugActivity.test1"]
//黑名单 粒度最小到类 暂不支持到方法
//methodBlacklist = ["com.facebook.drawee.backends.pipeline.Fresco"]
methodBlacklist = ["com.facebook.drawee.backends.pipeline.Fresco"]
}
//普通模式配置
normalMethod {
......
......@@ -18,7 +18,6 @@ if (rootProject.ext.config["runType"] == 0) {
debugImplementation "com.didichuxing.doraemonkit:dokitx:${rootProject.ext.android["jcenterArchivesVersionName"]}"
// debugImplementation "com.didichuxing.doraemonkit:doraemonkit-leakcanary:${rootProject.ext.android["jcenterArchivesVersionName"]}"
releaseImplementation "com.didichuxing.doraemonkit:dokitx-no-op:${rootProject.ext.android["jcenterArchivesVersionName"]}"
debugImplementation "com.didichuxing.doraemonkit:dokitx-weex:${rootProject.ext.android["jcenterArchivesVersionName"]}"
// debugImplementation "com.didichuxing.doraemonkit:dokitx-weex:${rootProject.ext.android["jcenterArchivesVersionName"]}"
}
}
\ No newline at end of file
......@@ -2,14 +2,14 @@ ext {
config = [
//0:运行模式
//1:打包模式
runOrPublish : 1,
runOrPublish : 0,
//0:依赖dokit本地module运行
//1:依赖dokit远程aar运行
runType : 0,
//0:发布到到本地localRepoURL仓库
//1:发布到滴滴内部仓库 一般不建议使用 如果需要发布到滴滴内网仓库需要将版本号改得比较大 假如版本号跟jcenter上的一致会由于缓存导致没法下载最新的jcenter的线上代码
//2:发布到jcenter远程仓库
publishArchivesType: 2,
publishArchivesType: 0,
//本地仓库地址
localRepoURL : "/Users/didi/project/dokit_repo"
]
......
......@@ -65,4 +65,10 @@ dependencies {
} else {
api "com.didichuxing.doraemonkit:dokitx:${rootProject.ext.android["jcenterArchivesVersionName"]}"
}
if (rootProject.ext.config["runOrPublish"] == 0) {
compileOnly project(":doraemonkit-okhttp-api")
} else {
compileOnly "com.didichuxing.doraemonkit:dokitx-okhttp-api:${rootProject.ext.android["jcenterArchivesVersionName"]}"
}
}
......@@ -128,21 +128,6 @@ class DokitWebViewClient(webViewClient: WebViewClient?, userAgent: String) : Web
JsHookDataManager.jsRequestMap.remove(requestBean.requestId)
return null
}
//web 抓包
if (NetworkManager.isActive()) {
try {
//构建okhttp用来抓包
val newRequest: Request =
JsHttpUtil.createOkHttpRequest(requestBean)
if (!JsHttpUtil.matchWhiteHost(newRequest)) {
//发送模拟请求
OkhttpClientUtil.okhttpClient.newCall(newRequest).execute()
}
} catch (e: Exception) {
e.printStackTrace()
}
}
// web 数据mock
return dealMock(requestBean, url, view, request)
......@@ -199,11 +184,25 @@ class DokitWebViewClient(webViewClient: WebViewClient?, userAgent: String) : Web
//如果interceptMatchedId和templateMatchedId都为null 直接不进行操作
if (interceptMatchedId.isNullOrBlank() && templateMatchedId.isNullOrBlank()) {
//web 抓包
if (NetworkManager.isActive()) {
try {
//构建okhttp用来抓包
val newRequest: Request =
JsHttpUtil.createOkHttpRequest(requestBean,mUserAgent)
if (JsHttpUtil.matchWhiteHost(newRequest)) {
//发送模拟请求
OkhttpClientUtil.okhttpClient.newCall(newRequest).execute()
}
} catch (e: Exception) {
e.printStackTrace()
}
}
return super.shouldInterceptRequest(view, request)
}
val newRequest: Request =
JsHttpUtil.createOkHttpRequest(requestBean)
JsHttpUtil.createOkHttpRequest(requestBean,mUserAgent)
//发送模拟请求
val newResponse =
OkhttpClientUtil.okhttpClient.newCall(newRequest).execute()
......@@ -285,7 +284,6 @@ class DokitWebViewClient(webViewClient: WebViewClient?, userAgent: String) : Web
}
@RequiresApi(Build.VERSION_CODES.N)
override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean {
updateH5DokitUrl(view, request?.url?.path)
......
......@@ -126,21 +126,7 @@ class DokitX5WebViewClient(webViewClient: WebViewClient?, userAgent: String) : W
JsHookDataManager.jsRequestMap.remove(requestBean.requestId)
return null
}
//web 抓包
if (NetworkManager.isActive()) {
try {
//构建okhttp用来抓包
val newRequest: Request =
JsHttpUtil.createOkHttpRequest(requestBean)
if (!JsHttpUtil.matchWhiteHost(newRequest)) {
//发送模拟请求
OkhttpClientUtil.okhttpClient.newCall(newRequest).execute()
}
} catch (e: Exception) {
e.printStackTrace()
}
}
// web 数据mock
return dealMock(requestBean, url, view, request)
......@@ -196,11 +182,26 @@ class DokitX5WebViewClient(webViewClient: WebViewClient?, userAgent: String) : W
//如果interceptMatchedId和templateMatchedId都为null 直接不进行操作
if (interceptMatchedId.isNullOrBlank() && templateMatchedId.isNullOrBlank()) {
//web 抓包
if (NetworkManager.isActive()) {
try {
//构建okhttp用来抓包
val newRequest: Request =
JsHttpUtil.createOkHttpRequest(requestBean,mUserAgent)
if (JsHttpUtil.matchWhiteHost(newRequest)) {
//发送模拟请求
OkhttpClientUtil.okhttpClient.newCall(newRequest).execute()
}
} catch (e: Exception) {
e.printStackTrace()
}
}
return super.shouldInterceptRequest(view, request)
}
val newRequest: Request =
JsHttpUtil.createOkHttpRequest(requestBean)
JsHttpUtil.createOkHttpRequest(requestBean,mUserAgent)
//发送模拟请求
val newResponse =
OkhttpClientUtil.okhttpClient.newCall(newRequest).execute()
......
......@@ -366,16 +366,22 @@ internal object JsHttpUtil {
}
fun createOkHttpRequest(requestBean: JsRequestBean): Request {
fun createOkHttpRequest(requestBean: JsRequestBean, userAgent: String): Request {
requestBean.headers?.let {
if (!it.containsKey("content-type")) {
it["content-type"] = "application/json"
}
if (!it.containsKey("User-Agent")) {
it["User-Agent"] = userAgent
}
}
val builder = Headers.Builder()
requestBean.headers?.forEach {
builder.add(it.key!!, it.value!!)
}
val headers = builder.build()
return when (requestBean.method?.toUpperCase()) {
"GET" -> {
......@@ -423,6 +429,7 @@ internal object JsHttpUtil {
if (whiteHostBeans.isEmpty()) {
return true
}
for (whiteHostBean in whiteHostBeans) {
if (TextUtils.isEmpty(whiteHostBean.host)) {
continue
......
......@@ -57,7 +57,7 @@ import java.util.List;
*/
public class NetWorkMockFragment extends BaseFragment {
private String projectId = DokitConstant.PRODUCT_ID;
private int pageSize = 1000;
private int pageSize = 100;
private String mFormatApiUrl = NetworkManager.MOCK_DOMAIN + "/api/app/interface?projectId=%s&isfull=1&curPage=%s&pageSize=%s";
private EditText mEditText;
private EasyRefreshLayout mInterceptRefreshLayout, mTemplateRefreshLayout;
......@@ -168,7 +168,7 @@ public class NetWorkMockFragment extends BaseFragment {
@Override
public void onRefreshing() {
initResponseApis();
initResponseApis(1);
}
});
//template
......@@ -186,7 +186,7 @@ public class NetWorkMockFragment extends BaseFragment {
@Override
public void onRefreshing() {
initResponseApis();
initResponseApis(1);
}
});
mRvWrap.setBackgroundColor(getResources().getColor(R.color.dk_color_F5F6F7));
......@@ -199,7 +199,7 @@ public class NetWorkMockFragment extends BaseFragment {
mRvTemplate.setLayoutManager(new LinearLayoutManager(getActivity()));
//请求接口列表
initResponseApis();
initResponseApis(1);
}
/**
......@@ -361,7 +361,12 @@ public class NetWorkMockFragment extends BaseFragment {
mInterceptLoadMoreModule.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore() {
loadMoreResponseApis();
if (mSelectedTableIndex == BOTTOM_TAB_INDEX_0) {
mInterceptLoadMoreModule.loadMoreEnd();
} else if (mSelectedTableIndex == BOTTOM_TAB_INDEX_1) {
mTemplateLoadMoreModule.loadMoreEnd();
}
//loadMoreResponseApis();
}
});
......@@ -397,7 +402,12 @@ public class NetWorkMockFragment extends BaseFragment {
mTemplateLoadMoreModule.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore() {
loadMoreResponseApis();
if (mSelectedTableIndex == BOTTOM_TAB_INDEX_0) {
mInterceptLoadMoreModule.loadMoreEnd();
} else if (mSelectedTableIndex == BOTTOM_TAB_INDEX_1) {
mTemplateLoadMoreModule.loadMoreEnd();
}
//loadMoreResponseApis();
}
});
......@@ -568,11 +578,21 @@ public class NetWorkMockFragment extends BaseFragment {
}
String initMockInterceptResponse = "";
String initTemplateInterceptResponse = "";
/**
* 初始化mock 接口列表
* 由于一次性请求数据过多会导致服务挂掉 所以拆分多次请求
*/
private void initResponseApis() {
String apiUrl = String.format(mFormatApiUrl, projectId, 1, pageSize);
private void initResponseApis(int currentPage) {
if (currentPage == 1) {
if (mSelectedTableIndex == BOTTOM_TAB_INDEX_0) {
initMockInterceptResponse = "";
} else if (mSelectedTableIndex == BOTTOM_TAB_INDEX_1) {
initTemplateInterceptResponse = "";
}
}
String apiUrl = String.format(mFormatApiUrl, projectId, currentPage, pageSize);
LogHelper.i(TAG, "apiUrl===>" + apiUrl);
Request<String> request = new StringRequest(Request.Method.GET, apiUrl, new Response.Listener<String>() {
......@@ -580,17 +600,49 @@ public class NetWorkMockFragment extends BaseFragment {
public void onResponse(String response) {
try {
if (mSelectedTableIndex == BOTTOM_TAB_INDEX_0) {
List<MockInterceptTitleBean> mockInterceptTitleBeans = dealInterceptResponseData(response);
initMenus(mockInterceptTitleBeans);
attachInterceptRv(mockInterceptTitleBeans);
MockApiResponseBean mockApiResponseBean = GsonUtils.fromJson(response, MockApiResponseBean.class);
List<MockApiResponseBean.DataBean.DatalistBean> lists = mockApiResponseBean.getData().getDatalist();
//判断是否为null
if (initMockInterceptResponse.isEmpty()) {
initMockInterceptResponse = response;
} else {
MockApiResponseBean AllMockApiResponseBean = GsonUtils.fromJson(initMockInterceptResponse, MockApiResponseBean.class);
List<MockApiResponseBean.DataBean.DatalistBean> AllLists = AllMockApiResponseBean.getData().getDatalist();
AllLists.addAll(lists);
initMockInterceptResponse = GsonUtils.toJson(AllMockApiResponseBean);
}
if (lists.size() < pageSize) {
List<MockInterceptTitleBean> mockInterceptTitleBeans = dealInterceptResponseData(initMockInterceptResponse);
initMenus(mockInterceptTitleBeans);
attachInterceptRv(mockInterceptTitleBeans);
mHomeTitleBar.setTitle(DokitUtil.getString(R.string.dk_kit_network_mock) + "(" + mockInterceptTitleBeans.size() + ")");
} else {
MockApiResponseBean AllMockApiResponseBean = GsonUtils.fromJson(initMockInterceptResponse, MockApiResponseBean.class);
initResponseApis(AllMockApiResponseBean.getData().getDatalist().size() / pageSize + 1);
}
mHomeTitleBar.setTitle(DokitUtil.getString(R.string.dk_kit_network_mock) + "(" + mockInterceptTitleBeans.size() + ")");
//测试空数据
//attachInterceptRv(null);
} else if (mSelectedTableIndex == BOTTOM_TAB_INDEX_1) {
List<MockTemplateTitleBean> mockTemplateTitleBeans = dealTemplateResponseData(response);
attachTemplateRv(mockTemplateTitleBeans);
mHomeTitleBar.setTitle(DokitUtil.getString(R.string.dk_kit_network_mock) + "(" + mockTemplateTitleBeans.size() + ")");
MockApiResponseBean mockApiResponseBean = GsonUtils.fromJson(response, MockApiResponseBean.class);
List<MockApiResponseBean.DataBean.DatalistBean> lists = mockApiResponseBean.getData().getDatalist();
//判断是否为null
if (initTemplateInterceptResponse.isEmpty()) {
initTemplateInterceptResponse = response;
} else {
MockApiResponseBean AllMockApiResponseBean = GsonUtils.fromJson(initMockInterceptResponse, MockApiResponseBean.class);
List<MockApiResponseBean.DataBean.DatalistBean> AllLists = AllMockApiResponseBean.getData().getDatalist();
AllLists.addAll(lists);
initTemplateInterceptResponse = GsonUtils.toJson(AllMockApiResponseBean);
}
if (lists.size() < pageSize) {
List<MockTemplateTitleBean> mockInterceptTitleBeans = dealTemplateResponseData(initTemplateInterceptResponse);
attachTemplateRv(mockInterceptTitleBeans);
mHomeTitleBar.setTitle(DokitUtil.getString(R.string.dk_kit_network_mock) + "(" + mockInterceptTitleBeans.size() + ")");
} else {
MockApiResponseBean AllMockApiResponseBean = GsonUtils.fromJson(initTemplateInterceptResponse, MockApiResponseBean.class);
initResponseApis(AllMockApiResponseBean.getData().getDatalist().size() / pageSize + 1);
}
}
} catch (Exception e) {
......@@ -618,10 +670,62 @@ public class NetWorkMockFragment extends BaseFragment {
});
VolleyManager.INSTANCE.add(request);
}
/**
* 初始化mock 接口列表
*/
// private void initResponseApis() {
// String apiUrl = String.format(mFormatApiUrl, projectId, 1, pageSize);
// LogHelper.i(TAG, "apiUrl===>" + apiUrl);
//
// Request<String> request = new StringRequest(Request.Method.GET, apiUrl, new Response.Listener<String>() {
// @Override
// public void onResponse(String response) {
// try {
// if (mSelectedTableIndex == BOTTOM_TAB_INDEX_0) {
// List<MockInterceptTitleBean> mockInterceptTitleBeans = dealInterceptResponseData(response);
// initMenus(mockInterceptTitleBeans);
// attachInterceptRv(mockInterceptTitleBeans);
//
// mHomeTitleBar.setTitle(DokitUtil.getString(R.string.dk_kit_network_mock) + "(" + mockInterceptTitleBeans.size() + ")");
// //测试空数据
// //attachInterceptRv(null);
// } else if (mSelectedTableIndex == BOTTOM_TAB_INDEX_1) {
// List<MockTemplateTitleBean> mockTemplateTitleBeans = dealTemplateResponseData(response);
// attachTemplateRv(mockTemplateTitleBeans);
// mHomeTitleBar.setTitle(DokitUtil.getString(R.string.dk_kit_network_mock) + "(" + mockTemplateTitleBeans.size() + ")");
// }
//
// } catch (Exception e) {
// e.printStackTrace();
// if (mSelectedTableIndex == BOTTOM_TAB_INDEX_0) {
// mInterceptRefreshLayout.refreshComplete();
// mHomeTitleBar.setTitle(DokitUtil.getString(R.string.dk_kit_network_mock) + "(0)");
// } else if (mSelectedTableIndex == BOTTOM_TAB_INDEX_1) {
// mTemplateRefreshLayout.refreshComplete();
// mHomeTitleBar.setTitle(DokitUtil.getString(R.string.dk_kit_network_mock) + "(0)");
// }
// }
// }
// }, new Response.ErrorListener() {
// @Override
// public void onErrorResponse(VolleyError error) {
// LogHelper.e(TAG, "error====>" + error.getMessage());
// ToastUtils.showShort(error.getMessage());
// if (mSelectedTableIndex == BOTTOM_TAB_INDEX_0) {
// mInterceptRefreshLayout.refreshComplete();
// } else if (mSelectedTableIndex == BOTTOM_TAB_INDEX_1) {
// mTemplateRefreshLayout.refreshComplete();
// }
// }
// });
//
// VolleyManager.INSTANCE.add(request);
//
//
// }
//private int rvTypeIntercept = 0;
//private int rvTypeTemplate = 1;
......@@ -867,7 +971,7 @@ public class NetWorkMockFragment extends BaseFragment {
mTemplateRefreshLayout.setVisibility(View.VISIBLE);
mSelectedTableIndex = BOTTOM_TAB_INDEX_1;
if (mTemplateApiAdapter == null) {
initResponseApis();
initResponseApis(1);
}
//设置数据条数
//设置数据条数
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="52dp"
android:orientation="vertical"
......@@ -7,15 +8,6 @@
android:paddingRight="16dp">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="接口1"
android:textColor="@color/dk_color_333333"
android:textSize="16sp" />
<ImageView
android:id="@+id/iv_more"
android:layout_width="12dp"
......@@ -32,6 +24,17 @@
android:layout_marginRight="26dp"
android:layout_toLeftOf="@id/iv_more" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/menu_switch"
android:textColor="@color/dk_color_333333"
android:textSize="16sp"
tools:text="接口1" />
<View
style="@style/DK.Divider"
android:layout_alignParentBottom="true" />
......
include ':empey-app'
//include ':app'
//include ':doraemonkit'
//include ':empey-app'
include ':app'
include ':doraemonkit'
//include ':doraemonkit-rpc'
include ':doraemonkit-no-op'
include ':doraemonkit-okhttp-v3'
include ':doraemonkit-okhttp-v4'
include ':doraemonkit-okhttp-api'
//include ':doraemonkit-weex'
include ':doraemonkit-weex'
//include ':doraemonkit-leakcanary'
include ':doraemonkit-plugin'
DoraemonKit-Android releases
===
## 3.3.0(dokit)
1、由于更新了库名称,等待jcenter审核中。
## 3.3.0(dokitx)
1、为了更好的支持android官方androidx和support,dokit从3.3.0版本开始正式对sdk名字进行更新。具体如下:androidx===>com.didichuxing.doraemonkit:dokitx:3.3.0; support===>com.didichuxing.doraemonkit:dokit:3.3.0;
2、新增H5助手功能:针对webview中的js请求进行数据Mock和抓包
3、新增三方库信息:将项目中依赖的三方库进行统一收集展现。
4、大量github issues 问题修复。
## 3.2.0 & 3.0.8.0
1.文件同步助手功能已推出。
详细文档参考:
......
## 接入方式
**Tip:**
**1、为了更好的支持android官方androidx和support,dokit从3.3.0版本开始正式对sdk名字进行更新。具体如下:androidx===>com.didichuxing.doraemonkit:dokitx:3.3.0; support===>com.didichuxing.doraemonkit:dokit:3.3.0;**
**下面所有的日志均用dokitx举例。要使用support版本请将dokitx改为dokit即可。**
|DoKit|最新版本|描述|
|-|-|-|
|支持Androidx|3.2.0|从v3.1.0版本开始支持androidx|
|支持Androidx|3.3.0|从v3.3.0版本开始更名为dokitx|
|支持android support|3.0.8.0|3.0.8.0版本对应3.2.0的功能,后期support将会不定期更新,主要还是看社区的反馈,请大家尽快升级和适配Androidx|
#### 1. Gradle 依赖
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.2.0'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.2.0'
debugImplementation 'com.didichuxing.doraemonkit:dokitx:3.3.0'
releaseImplementation 'com.didichuxing.doraemonkit:dokitx-no-op:3.3.0'
}
```
......@@ -21,20 +27,20 @@ dependencies {
滴滴内部业务线接入请将
```
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.2.0'
debugImplementation 'com.didichuxing.doraemonkit:dokitx:3.3.0'
```
替换为
```
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-rpc:3.2.0'
debugImplementation 'com.didichuxing.doraemonkit:dokitx-rpc:3.3.0'
```
**注意:**
假如你无法通过 jcenter 下载到依赖库并报了以下的错误
```
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.2.0
ERROR: Failed to resolve: com.didichuxing.doraemonkit:dokitx:3.3.0
```
建议你可以尝试挂载VPN或通过命令行重试(以Mac系统为例 项目根目录下)
......@@ -63,21 +69,13 @@ DoraemonKit目前已支持Weex工具,包括
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.2.0'
debugImplementation 'com.didichuxing.doraemonkit:dokitx-weex:3.3.0'
}
```
如果有需要集成 `LeakCanary` 的需求可以直接添加下面依赖
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.2.0'
}
```
`LeakCanary` 已经在 doraemonkit 中动态集成,不需要自己再进行手动集成,只需要添加上面的依赖即可。
`LeakCanary` 已经被废弃 大家可以自行集成leakCanary的2.0+版本。
#### 2. 初始化
......@@ -118,7 +116,7 @@ AOP包括以下几个功能:
buildscript {
dependencies {
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.2.0'
classpath 'com.didichuxing.doraemonkit:dokitx-plugin:3.3.0'
}
}
......@@ -143,6 +141,8 @@ dokitExt {
networkSwitch true
//大图开关
bigImgSwitch true
//webView js 抓包
webViewSwitch true
}
slowMethod {
......@@ -158,6 +158,8 @@ dokitExt {
thresholdTime 10
//调用栈函数入口
enterMethods = ["com.didichuxing.doraemondemo.MainDebugActivity.test1"]
//黑名单 粒度最小到类 暂不支持到方法
methodBlacklist = ["com.facebook.drawee.backends.pipeline.Fresco"]
}
//普通模式配置
normalMethod {
......@@ -177,6 +179,8 @@ dokitExt {
# 插件开关
DOKIT_PLUGIN_SWITCH=true
# 插件日志
# 自定义Webview的全限定名
DOKIT_WEBVIEW_CLASS_NAME=com/didichuxing/doraemonkit/widget/webview/MyWebView
DOKIT_LOG_SWITCH=true
#dokit 慢函数开关
DOKIT_METHOD_SWITCH=true
......
# Android Guide
**Tip:**
**1、In order to better support the official androidx and support of android, dokit has officially updated the sdk name from version 3.3.0. details as follows:androidx===>com.didichuxing.doraemonkit:dokitx:3.3.0; support===>com.didichuxing.doraemonkit:dokit:3.3.0;**
**All the logs below use dokitx as an example. To use the support version, please change dokitx to dokit.**
|DoKit|new Version|Desc|
|- |- |- |
|support Androidx|3.2.0|support Androidx from v3.1.0|
|support Androidx|3.3.0|support Androidx from v3.1.0|
|supprot android support|3.0.8.0|Version 3.0.8.0 corresponds to the function of 3.2.0. Later support will be updated from time to time, mainly based on community feedback, please upgrade and adapt to Androidx as soon as possible|
......@@ -10,8 +14,8 @@
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.2.0'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.2.0'
debugImplementation 'com.didichuxing.doraemonkit:dokitx:3.3.0'
releaseImplementation 'com.didichuxing.doraemonkit:dokitx-no-op:3.3.0'
}
```
......@@ -21,7 +25,7 @@ dependencies {
If you cannot download the dependent library through jcenter and report the following error
```
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.2.0
ERROR: Failed to resolve: com.didichuxing.doraemonkit:dokitx:3.3.0
```
You can try again from the command line (take Mac system as an example under the project root directory)
......@@ -47,7 +51,7 @@ If you need to support Weex, you can directly add the following dependencies
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.2.0'
debugImplementation 'com.didichuxing.doraemonkit:dokitx-weex:3.3.0'
}
```
......@@ -89,7 +93,7 @@ Plugin includes the following functions:
```groovy
buildscript {
dependencies {
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.2.0'
classpath 'com.didichuxing.doraemonkit:dokitx-plugin:3.3.0'
}
}
```
......
......@@ -26,7 +26,7 @@
<div align="center">
<img src="https://javer.oss-cn-shanghai.aliyuncs.com/doraemon/github/DoraemonKit_github.png" width = "150" height = "150" alt="DoraemonKit" align=left />
<img src="https://img.shields.io/github/license/didi/DoraemonKit.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.2.0-blue.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.3.0-blue.svg" align=left />
<img src="https://img.shields.io/badge/iOS-3.0.4-yellow.svg" align=left />
<img src="https://img.shields.io/badge/miniapp-0.0.1-red.svg" align=left />
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" align=left />
......
<div align="center">
<img src="https://javer.oss-cn-shanghai.aliyuncs.com/doraemon/github/DoraemonKit_github.png" width = "150" height = "150" alt="DoraemonKit" align=left />
<img src="https://img.shields.io/github/license/didi/DoraemonKit.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.2.0-blue.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.3.0-blue.svg" align=left />
<img src="https://img.shields.io/badge/iOS-3.0.4-yellow.svg" align=left />
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" align=left />
</div>
......@@ -122,7 +122,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.2.0'
classpath 'com.didichuxing.doraemonkit:dokitx-plugin:3.3.0'
}
}
......@@ -135,8 +135,8 @@ apply plugin: 'com.didi.dokit'
and then implementation DoKit SDK
```
debugImplementation "com.didichuxing.doraemonkit:doraemonkit:3.2.0"
releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:3.2.0"
debugImplementation "com.didichuxing.doraemonkit:dokitx:3.3.0"
releaseImplementation "com.didichuxing.doraemonkit:dokitx-no-op:3.3.0"
```
#### 2、SDK Init
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册