Commit da7d4f2b by 霍志良

feat:MMKV引入

parent 873819af
...@@ -33,7 +33,7 @@ ext { ...@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.40.89", "ydl-platform" : "0.0.40.92",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.61", "ydl-webview" : "0.0.38.61",
...@@ -116,7 +116,7 @@ ext { ...@@ -116,7 +116,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.40.89", "ydl-platform" : "0.0.40.92",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.61", "ydl-webview" : "0.0.38.61",
...@@ -261,6 +261,7 @@ ext { ...@@ -261,6 +261,7 @@ ext {
"ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar", "ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar",
"ydl-router" : "com.ydl:ydl-router:1.4.1-SNAPSHOT@aar", "ydl-router" : "com.ydl:ydl-router:1.4.1-SNAPSHOT@aar",
"xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar", "xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar",
"mmkv" : "com.tencent:mmkv-static:1.2.6",
"arouter-api" : "com.alibaba:arouter-api:1.4.1", "arouter-api" : "com.alibaba:arouter-api:1.4.1",
"arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2", "arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2",
"exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0", "exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0",
......
...@@ -42,6 +42,7 @@ import android.widget.TextView; ...@@ -42,6 +42,7 @@ import android.widget.TextView;
import com.luck.picture.lib.entity.LocalMedia; import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.listener.OnResultCallbackListener; import com.luck.picture.lib.listener.OnResultCallbackListener;
import com.tbruyelle.rxpermissions2.RxPermissions; import com.tbruyelle.rxpermissions2.RxPermissions;
import com.tencent.mmkv.MMKV;
import com.ydl.webview.H5Params; import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity; import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
...@@ -227,7 +228,7 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie ...@@ -227,7 +228,7 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
public void onEventMainThread(DynamicSaveEvent event) { public void onEventMainThread(DynamicSaveEvent event) {
//保留草稿数据 标题、内容、话题、是否专家可见、是否匿名、图片 //保留草稿数据 标题、内容、话题、是否专家可见、是否匿名、图片
// MMKV.defaultMMKV().encode()
} }
@Override @Override
public void initDataAndEventLazy() { public void initDataAndEventLazy() {
......
...@@ -144,6 +144,7 @@ dependencies { ...@@ -144,6 +144,7 @@ dependencies {
api rootProject.ext.dependencies["support-multidex"] api rootProject.ext.dependencies["support-multidex"]
api rootProject.ext.dependencies["tablayout"] api rootProject.ext.dependencies["tablayout"]
api rootProject.ext.dependencies["xrecyclerview"] api rootProject.ext.dependencies["xrecyclerview"]
api rootProject.ext.dependencies["mmkv"]
api rootProject.ext.dependencies["flowlayout"] api rootProject.ext.dependencies["flowlayout"]
api rootProject.ext.dependencies["androidanimations"] api rootProject.ext.dependencies["androidanimations"]
//====================Tools==================== //====================Tools====================
......
...@@ -5,6 +5,7 @@ import android.app.Application ...@@ -5,6 +5,7 @@ import android.app.Application
import android.os.Build import android.os.Build
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.bun.miitmdid.core.JLibrary import com.bun.miitmdid.core.JLibrary
import com.tencent.mmkv.MMKV
import com.ydl.devicesidlib.DeviceIDHelper import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.UpLoadLogUtils import com.ydl.ydlcommon.data.http.UpLoadLogUtils
...@@ -31,6 +32,7 @@ object YdlRepository { ...@@ -31,6 +32,7 @@ object YdlRepository {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
JLibrary.InitEntry(app) JLibrary.InitEntry(app)
} }
MMKV.initialize(app);
LogHelper.getInstance().deleteExpireLogSync() LogHelper.getInstance().deleteExpireLogSync()
LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment