From c263e3543ceb9f195777193b1c2a6a2220f4d981 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 7 Jun 2024 10:39:47 +0800 Subject: [PATCH] =?UTF-8?q?6.7.0=E8=B0=B7=E6=AD=8C=E9=80=81=E5=AE=A1?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 13 ++++++++--- baidu/build.gradle | 3 ++- beauty/build.gradle | 3 ++- common/build.gradle | 7 +++++- .../manager/InstructorRemarkManager.java | 17 +++++--------- .../yunbao/common/manager/OpenAdManager.java | 22 +++++++++++++------ .../com/yunbao/common/utils/DeviceUtils.java | 11 ++++++++++ config.gradle | 12 +++++----- live/build.gradle | 2 +- main/build.gradle | 7 +++++- pluginsForAnchor/build.gradle | 7 +++++- video/build.gradle | 7 +++++- 12 files changed, 77 insertions(+), 34 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 93f78871e..2a8663708 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -188,7 +188,7 @@ android { if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") { isTest = "正式服" } - outputFileName = "[${new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk" + outputFileName = "[${new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8"))}]潘多拉-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk" } } @@ -231,8 +231,15 @@ android { multiDexEnabled true ndk { // TODO: 谷歌商城需要兼容两个平台 - //abiFilters "armeabi-v7a", "arm64-v8a" - abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" + println("打包版本:${rootProject.ext.manifestPlaceholders.isGooglePlay}") + if (rootProject.ext.manifestPlaceholders.isGooglePlay == 0) { + abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + println("链接包") + } else { + abiFilters "armeabi-v7a", "arm64-v8a" + println("谷歌包") + } + } javaCompileOptions { annotationProcessorOptions { diff --git a/baidu/build.gradle b/baidu/build.gradle index e8264e585..e5d8c54b8 100644 --- a/baidu/build.gradle +++ b/baidu/build.gradle @@ -31,7 +31,8 @@ android { versionName rootProject.ext.android.versionName manifestPlaceholders = rootProject.ext.manifestPlaceholders ndk { - abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64" + // abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64" + abiFilters "armeabi-v7a", "arm64-v8a" } } buildTypes { diff --git a/beauty/build.gradle b/beauty/build.gradle index 1a371ced8..94e5947bd 100644 --- a/beauty/build.gradle +++ b/beauty/build.gradle @@ -31,7 +31,8 @@ android { versionName rootProject.ext.android.versionName manifestPlaceholders = rootProject.ext.manifestPlaceholders ndk { - abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64" + // abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64" + abiFilters "armeabi-v7a", "arm64-v8a" } } aaptOptions { diff --git a/common/build.gradle b/common/build.gradle index dc6938055..5d48a76cd 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -14,7 +14,12 @@ android { versionName rootProject.ext.android.versionName manifestPlaceholders = rootProject.ext.manifestPlaceholders ndk { - abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" + // abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" + if (rootProject.ext.manifestPlaceholders.isGooglePlay == 0) { + abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + } else { + abiFilters "armeabi-v7a", "arm64-v8a" + } } javaCompileOptions { diff --git a/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java b/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java index cd6fa2229..6c6c4ac2e 100644 --- a/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java +++ b/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java @@ -47,13 +47,11 @@ public class InstructorRemarkManager extends BaseCacheManager { if (null == instructorRemarkMap) { String string = getString(KEY_INSTRUCTOR_REMARK); if (!StringUtil.isEmpty(string)) { - instructorRemarkMap = JSON.parseObject(string, new TypeReference>() { - - }); + instructorRemarkMap = JSON.parseObject(string, Map.class); } } - }catch (Exception e){ - Log.i("remark", "getInstructorRemark: "+getString(KEY_INSTRUCTOR_REMARK)); + } catch (Exception e) { + Log.i("remark", "getInstructorRemark: " + getString(KEY_INSTRUCTOR_REMARK)); e.printStackTrace(); } if (instructorRemarkMap == null) { @@ -66,12 +64,11 @@ public class InstructorRemarkManager extends BaseCacheManager { * 设置指导员备注信息 */ public void setInstructorRemark(String map) { - this.instructorRemarkMap = JSON.parseObject(map, new TypeReference>() { - }); + this.instructorRemarkMap = JSON.parseObject(map, Map.class); put(KEY_INSTRUCTOR_REMARK, map); for (String key : instructorRemarkMap.keySet()) { UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(key); - if(userInfo!=null){ + if (userInfo != null && !StringUtil.isEmpty(instructorRemarkMap.get(key))) { userInfo.setName(instructorRemarkMap.get(key)); RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo); } @@ -133,9 +130,7 @@ public class InstructorRemarkManager extends BaseCacheManager { @Override public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { - instructorRemarkMap = JSON.parseObject(info[0], new TypeReference>() { - - }); + instructorRemarkMap = JSON.parseObject(info[0], Map.class); setInstructorRemark(info[0]); } diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java index 08e1c154b..fb98cffae 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -54,10 +54,18 @@ public class OpenAdManager { } public void clear() { - runnableMap.clear(); - showMap.clear(); - list.clear(); - waitRunnableMap.clear(); + if (runnableMap != null) { + runnableMap.clear(); + } + if (showMap != null) { + showMap.clear(); + } + if (list != null) { + list.clear(); + } + if (waitRunnableMap != null) { + waitRunnableMap.clear(); + } list = null; runNowRunnable = null; } @@ -114,7 +122,7 @@ public class OpenAdManager { } private static long showTime = 0; - private OnItemClickListener onItemClickListener=new OnItemClickListener() { + private OnItemClickListener onItemClickListener = new OnItemClickListener() { @Override public void onItemClick(String bean, int position) { @@ -123,7 +131,7 @@ public class OpenAdManager { public synchronized void show(int type, boolean isGuard) { showType = type; - if(true){ + if (false) { //潘多拉不需要彈窗 return; } @@ -327,7 +335,7 @@ public class OpenAdManager { if (model.getShowModel() == OpenAdModel.SHOW_DIY) { String nextTime = String.valueOf(System.currentTimeMillis() + (Long.parseLong(model.getSection()) * 60 * 1000)); SpUtil.setStringValue("open_ad_popup_time_" + model.getId(), nextTime); - Log.i(TAG, "run: 下一次展示时间:"+nextTime+" | "+model.getSection()); + Log.i(TAG, "run: 下一次展示时间:" + nextTime + " | " + model.getSection()); showMap.remove(model.getId()); } if (model.getModel() == OpenAdModel.MODEL_BOTTOM) { diff --git a/common/src/main/java/com/yunbao/common/utils/DeviceUtils.java b/common/src/main/java/com/yunbao/common/utils/DeviceUtils.java index d298abdac..e5f2c3f9d 100644 --- a/common/src/main/java/com/yunbao/common/utils/DeviceUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/DeviceUtils.java @@ -90,6 +90,17 @@ public class DeviceUtils { } return "0"; + } + public static String getVersionName2(Context context) { + try { + PackageManager manager = context.getPackageManager(); + PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0); + return info.versionCode+""; + } catch (Exception e) { + e.printStackTrace(); + } + return "0"; + } /** diff --git a/config.gradle b/config.gradle index a707b1a44..1bca5e9f7 100644 --- a/config.gradle +++ b/config.gradle @@ -4,20 +4,20 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 23, targetSdkVersion : 33, - versionCode : 676, - versionName : "6.6.9", + versionCode : 529, + versionName : "6.7.0", namespace : "com.pandoralive.shayu" ] manifestPlaceholders = [ //正式、 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", // 测试 - serverHost : " https://ceshi.yaoulive.com", +// serverHost : " https://ceshi.yaoulive.com", buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")), //百度语音识别 - swReleaseModel : false, //true 声网正式服 false 测试服 + swReleaseModel : true, //true 声网正式服 false 测试服 baiduAppId : "23774720", baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB", @@ -26,7 +26,7 @@ ext { // true表示谷歌支付 false // isGooglePlay : false, // true表示谷歌支付 false 0 链接包(isPluginModel-> true) 1 谷歌包 2华为包 3 samsung包 - isGooglePlay : 0, + isGooglePlay : 1, //是否上报异常日志 isUploadLog : true, diff --git a/live/build.gradle b/live/build.gradle index 3828a60ac..b2168df50 100644 --- a/live/build.gradle +++ b/live/build.gradle @@ -1 +1 @@ -apply plugin: 'com.android.library' apply plugin: 'img-optimizer' apply plugin: 'kotlin-android' android { namespace "com.yunbao.live" compileSdk rootProject.ext.android.compileSdkVersion aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false packagingOptions { pickFirst "lib/armeabi/libyuvutils.so" pickFirst "lib/arm64-v8a/libyuvutils.so" pickFirst "lib/armeabi-v7a/libyuvutils.so" pickFirst "lib/armeabi/libyuvtools.so" pickFirst "lib/arm64-v8a/libyuvtools.so" pickFirst "lib/armeabi-v7a/libyuvtools.so" exclude "lib/arm64-v8a/libmmcv_api_handgesture.so" exclude "lib/arm64-v8a/libmmcv_api_express.so" exclude "lib/arm64-v8a/libMediaEncoder.so" exclude "lib/arm64-v8a/libarcore_sdk_c.so" exclude "lib/arm64-v8a/libmediadecoder.so" exclude "lib/arm64-v8a/libMediaMuxer.so" exclude "lib/arm64-v8a/libarcore_sdk_jni.so" exclude "lib/arm64-v8a/libMediaUtils.so" exclude "lib/arm64-v8a/libcosmosffmpeg.so" } defaultConfig { minSdkVersion rootProject.ext.android.minSdkVersion targetSdkVersion rootProject.ext.android.targetSdkVersion versionCode rootProject.ext.android.versionCode versionName rootProject.ext.android.versionName manifestPlaceholders = rootProject.ext.manifestPlaceholders ndk { abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" } javaCompileOptions { annotationProcessorOptions { arguments = [AROUTER_MODULE_NAME: project.getName()] } } } aaptOptions { cruncherEnabled = false useNewCruncher = false } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } kotlinOptions { allWarningsAsErrors = true } compileOptions { sourceCompatibility JavaVersion.VERSION_18 targetCompatibility JavaVersion.VERSION_18 } } repositories { flatDir { dirs 'libs', '../libs' } mavenCentral() } dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.0.0' implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) implementation (name:'../libs/beautysdk-202202241203',ext:'aar') implementation (name:'../libs/svgaplayer-release-v1.2.1',ext:'aar') //socket.io implementation('io.socket:socket.io-client:1.0.0') { exclude group: 'org.json', module: 'json' } //common api project(path:':lib_faceunity')//新娱美颜 api project(':Share')//分享 annotationProcessor rootProject.ext.dependencies["arouter-compiler"] //工具 api rootProject.ext.dependencies["blank-utilcode"] implementation 'com.eightbitlab:blurview:1.6.6' implementation 'com.google.code.gson:gson:2.8.6' implementation "com.getkeepsafe.relinker:relinker:1.4.4" } \ No newline at end of file +apply plugin: 'com.android.library' apply plugin: 'img-optimizer' apply plugin: 'kotlin-android' android { namespace "com.yunbao.live" compileSdk rootProject.ext.android.compileSdkVersion aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false packagingOptions { pickFirst "lib/armeabi/libyuvutils.so" pickFirst "lib/arm64-v8a/libyuvutils.so" pickFirst "lib/armeabi-v7a/libyuvutils.so" pickFirst "lib/armeabi/libyuvtools.so" pickFirst "lib/arm64-v8a/libyuvtools.so" pickFirst "lib/armeabi-v7a/libyuvtools.so" exclude "lib/arm64-v8a/libmmcv_api_handgesture.so" exclude "lib/arm64-v8a/libmmcv_api_express.so" exclude "lib/arm64-v8a/libMediaEncoder.so" exclude "lib/arm64-v8a/libarcore_sdk_c.so" exclude "lib/arm64-v8a/libmediadecoder.so" exclude "lib/arm64-v8a/libMediaMuxer.so" exclude "lib/arm64-v8a/libarcore_sdk_jni.so" exclude "lib/arm64-v8a/libMediaUtils.so" exclude "lib/arm64-v8a/libcosmosffmpeg.so" } defaultConfig { minSdkVersion rootProject.ext.android.minSdkVersion targetSdkVersion rootProject.ext.android.targetSdkVersion versionCode rootProject.ext.android.versionCode versionName rootProject.ext.android.versionName manifestPlaceholders = rootProject.ext.manifestPlaceholders ndk { //abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" if (rootProject.ext.manifestPlaceholders.isGooglePlay == 0) { abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" } else { abiFilters "armeabi-v7a", "arm64-v8a" } } javaCompileOptions { annotationProcessorOptions { arguments = [AROUTER_MODULE_NAME: project.getName()] } } } aaptOptions { cruncherEnabled = false useNewCruncher = false } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } kotlinOptions { allWarningsAsErrors = true } compileOptions { sourceCompatibility JavaVersion.VERSION_18 targetCompatibility JavaVersion.VERSION_18 } } repositories { flatDir { dirs 'libs', '../libs' } mavenCentral() } dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.0.0' implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) implementation (name:'../libs/beautysdk-202202241203',ext:'aar') implementation (name:'../libs/svgaplayer-release-v1.2.1',ext:'aar') //socket.io implementation('io.socket:socket.io-client:1.0.0') { exclude group: 'org.json', module: 'json' } //common api project(path:':lib_faceunity')//新娱美颜 api project(':Share')//分享 annotationProcessor rootProject.ext.dependencies["arouter-compiler"] //工具 api rootProject.ext.dependencies["blank-utilcode"] implementation 'com.eightbitlab:blurview:1.6.6' implementation 'com.google.code.gson:gson:2.8.6' implementation "com.getkeepsafe.relinker:relinker:1.4.4" } \ No newline at end of file diff --git a/main/build.gradle b/main/build.gradle index 53c6bcf00..ba304dc16 100644 --- a/main/build.gradle +++ b/main/build.gradle @@ -30,7 +30,12 @@ android { versionName rootProject.ext.android.versionName manifestPlaceholders = rootProject.ext.manifestPlaceholders ndk { - abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" + // abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" + if (rootProject.ext.manifestPlaceholders.isGooglePlay == 0) { + abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + } else { + abiFilters "armeabi-v7a", "arm64-v8a" + } } javaCompileOptions { diff --git a/pluginsForAnchor/build.gradle b/pluginsForAnchor/build.gradle index 50eb0c37d..b81a861bb 100644 --- a/pluginsForAnchor/build.gradle +++ b/pluginsForAnchor/build.gradle @@ -119,7 +119,12 @@ android { versionName rootProject.ext.android.versionName manifestPlaceholders = rootProject.ext.manifestPlaceholders ndk { - abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" + // abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" + if (rootProject.ext.manifestPlaceholders.isGooglePlay == 0) { + abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + } else { + abiFilters "armeabi-v7a", "arm64-v8a" + } } } aaptOptions { diff --git a/video/build.gradle b/video/build.gradle index 64d86bea7..12847c487 100644 --- a/video/build.gradle +++ b/video/build.gradle @@ -31,7 +31,12 @@ android { versionName rootProject.ext.android.versionName manifestPlaceholders = rootProject.ext.manifestPlaceholders ndk { - abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64" + // abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64" + if (rootProject.ext.manifestPlaceholders.isGooglePlay == 0) { + abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + } else { + abiFilters "armeabi-v7a", "arm64-v8a" + } } javaCompileOptions { annotationProcessorOptions {