From de8d5d78ff8bba1355d5adc69c1a03ddf2145029 Mon Sep 17 00:00:00 2001
From: zlzw <583819556@qq.com>
Date: Thu, 20 Jun 2024 18:04:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5PD=E4=BF=AE=E5=A4=8D=E5=86=85?=
=?UTF-8?q?=E5=AE=B9=EF=BC=9A=20[=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5Engli?=
=?UTF-8?q?sh=E5=88=86=E7=B1=BB=E4=B8=8B=EF=BC=8C=E4=B8=8B=E6=8B=89?=
=?UTF-8?q?=E5=88=B7=E6=96=B0=E6=B2=A1=E6=9C=89=E6=95=B0=E6=8D=AE=E9=97=AE?=
=?UTF-8?q?=E9=A2=98]=20=E5=90=8C=E6=AD=A5PD=E6=89=93=E5=8C=85=E8=84=9A?=
=?UTF-8?q?=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FaceUnity/build.gradle | 2 +-
IAP6Helper/build.gradle | 2 +
Share/build.gradle | 2 +-
app/build.gradle | 105 ++++++++++++++----
app/tmp/full-r8-config.txt | 12 +-
build.gradle | 6 +-
common/build.gradle | 3 +-
config.gradle | 2 +-
lib_country_code/build.gradle | 2 +-
lib_faceunity/build.gradle | 4 +-
lib_google/build.gradle | 1 +
lib_huawei/build.gradle | 11 +-
live/build.gradle | 2 +-
main/build.gradle | 1 +
.../main/views/MainHomeLiveViewHolder.java | 3 +
package_config.gradle | 43 +++++++
settings.gradle | 2 +-
video/build.gradle | 2 +-
18 files changed, 161 insertions(+), 44 deletions(-)
create mode 100644 package_config.gradle
diff --git a/FaceUnity/build.gradle b/FaceUnity/build.gradle
index 254ca57ee..c80fdd37d 100644
--- a/FaceUnity/build.gradle
+++ b/FaceUnity/build.gradle
@@ -8,7 +8,7 @@ plugins {
id 'kotlin-parcelize'
id 'img-optimizer'
}
-
+apply from: "../package_config.gradle"
android {
namespace "com.yunbao.faceunity"
diff --git a/IAP6Helper/build.gradle b/IAP6Helper/build.gradle
index c44647428..0f459a391 100644
--- a/IAP6Helper/build.gradle
+++ b/IAP6Helper/build.gradle
@@ -1,4 +1,6 @@
apply plugin: 'com.android.library'
+apply from: "../package_config.gradle"
+
android {
namespace "com.samsung.android.sdk.iap.lib"
compileSdk rootProject.ext.android.compileSdkVersion
diff --git a/Share/build.gradle b/Share/build.gradle
index 7537b689a..77c8e4af7 100644
--- a/Share/build.gradle
+++ b/Share/build.gradle
@@ -8,7 +8,7 @@ plugins {
id 'kotlin-parcelize'
id 'img-optimizer'
}
-
+apply from: "../package_config.gradle"
android {
namespace "com.pdlive.shayu"
diff --git a/app/build.gradle b/app/build.gradle
index 2a8663708..a289e6b1d 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -3,6 +3,7 @@ apply plugin: 'img-optimizer'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.alibaba.arouter'
+apply from: "../package_config.gradle"
android {
namespace "com.pandoralive.shayu"
dexOptions {
@@ -107,22 +108,26 @@ android {
buildFeatures {
buildConfig = true
}
+
+
applicationVariants.all { variant ->
println "清空build文件夹";
for (final def project in rootProject.getAllprojects()) {
+ def name = variant.name.replace('Debug', '').replace('Release', '').toLowerCase()
delete project.buildDir
+ delete 'app' + File.separator + name
println project.buildDir
}
String variantName = variant.name.capitalize()
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
processManifestTask.doLast { pm ->
- String manifestPath = "build/intermediates/merged_manifests/release/processReleaseManifest/AndroidManifest.xml"
- def isGooglePlay = rootProject.ext.manifestPlaceholders.isGooglePlay
+ String manifestPath = "build/intermediates/merged_manifests/google_onlineRelease/processGoogle_onlineReleaseManifest/AndroidManifest.xml"
+ def isGooglePlay = variant.name.contains("google")
println "谷歌版本:" + isGooglePlay
println "文件存在" + file(manifestPath).exists()
println "" + (isGooglePlay == 1)
- println "" + (file(manifestPath).exists() && isGooglePlay == 1)
- if (file(manifestPath).exists() && isGooglePlay == 1) {
+ println "" + (file(manifestPath).exists() && isGooglePlay)
+ if (file(manifestPath).exists() && isGooglePlay) {
def manifestContent = file(manifestPath).getText()
println "移除权限"
manifestContent = manifestContent.replace('', '')
@@ -130,6 +135,13 @@ android {
} else {
print "not Exists = " + manifestPath
}
+ if (file(manifestPath).exists() && isGooglePlay) {
+ def manifestContent = file(manifestPath).getText()
+ println "移除权限2"
+ manifestContent = manifestContent.replace('', '')
+ file(manifestPath).write(manifestContent)
+
+ }
}
variant.mergeAssetsProvider.configure {
doLast {
@@ -171,26 +183,77 @@ android {
}
}
}
- variant.outputs.all {
- def isGoogle = "链接"
- if (rootProject.ext.manifestPlaceholders.isGooglePlay == 1) {
- isGoogle = "谷歌"
- } else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 2) {
- isGoogle = "Huawei"
- } else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 3) {
- isGoogle = "Samsung"
+ variant.outputs.all { vt ->
+ println("输出文件名:${vt}")
+ def channel = ''
+ def server=''
+ if (variant.name.startsWith('huawei')) {
+ channel = "华为"
+ } else if (variant.name.startsWith('samsung')) {
+ channel = "三星"
+ } else if (variant.name.startsWith('google')) {
+ channel = "谷歌"
+ } else {
+ channel = "链接"
}
- def isPlugin = "完整"
- if (rootProject.ext.manifestPlaceholders.isPluginModel) {
- isPlugin = "插件"
+ if(variant.name.contains('online')){
+ server='正式服'
+ }else{
+ server='测试服'
}
- def isTest = "测试服"
- if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") {
- isTest = "正式服"
- }
- outputFileName = "[${new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8"))}]潘多拉-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
-
+ outputFileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${channel}-${server}-${variant.buildType.name}.apk"
}
+ tasks.named("sign${variant.name.capitalize()}Bundle", com.android.build.gradle.internal.tasks.FinalizeBundleTask) {
+ File file = finalBundleFile.asFile.get()
+ def channel = ''
+ if (variant.name.startsWith('huawei')) {
+ channel = "华为"
+ } else if (variant.name.startsWith('samsung')) {
+ channel = "三星"
+ } else if (variant.name.startsWith('google')) {
+ channel = "谷歌"
+ } else {
+ channel = "链接"
+ }
+ File finalFile = new File(file.parentFile, "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${channel}-${variant.buildType.name}.aab")
+ finalBundleFile.set(finalFile)
+ }
+ project.afterEvaluate { project ->
+ project.tasks.each {
+ if (it.name.startsWith('assemble') && it.name.endsWith('Release')) {
+ it.doLast {
+ def dir = it.name.replace('assemble', '').replace('Release', '').toLowerCase()
+ println("处理assembleRelease ${project.rootDir}\\app\\$dir\\release\\ | " + new File("${project.rootDir}\\app\\$dir\\release\\").exists())
+ if (new File("${project.rootDir}\\app\\$dir\\release\\").exists()) {
+ println("准备拷贝apk文件")
+ copy {
+ from file("${project.rootDir}\\app\\$dir\\release\\")
+ into file("${project.rootDir}\\outputs\\apk\\")
+ include '**/*.apk'
+ }
+
+ }
+ println("打包apk结束")
+ }
+ } else if (it.name.startsWith('sign') && it.name.endsWith('ReleaseBundle')) {
+ it.doLast {
+ def dir = it.name.replace('sign', '').replace('ReleaseBundle', '').toLowerCase()
+ println("处理signReleaseBundle ${project.rootDir}\\app\\$dir\\release\\ | " + new File("${project.rootDir}\\app\\$dir\\release\\").exists())
+ if (new File("${project.rootDir}\\app\\$dir\\release\\").exists()) {
+ println("准备拷贝aab文件")
+ copy {
+ from file("${project.rootDir}\\app\\$dir\\release\\")
+ into file("${project.rootDir}\\outputs\\aab\\")
+ include '**/*.aab'
+ }
+
+ }
+ println("打包aab结束")
+ }
+ }
+ }
+ }
+
}
signingConfigs {
release {
diff --git a/app/tmp/full-r8-config.txt b/app/tmp/full-r8-config.txt
index dfa53175e..975b568ab 100644
--- a/app/tmp/full-r8-config.txt
+++ b/app/tmp/full-r8-config.txt
@@ -416,7 +416,7 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
-ignorewarnings
# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\app\proguard-rules.pro
-# The proguard configuration file for the following section is C:\Users\58381\Documents\AndroidProject\pandorapan\app\build\intermediates\aapt_proguard_file\release\processReleaseResources\aapt_rules.txt
+# The proguard configuration file for the following section is C:\Users\58381\Documents\AndroidProject\pandorapan\app\build\intermediates\aapt_proguard_file\google_onlineRelease\processGoogle_onlineReleaseResources\aapt_rules.txt
-keep class androidx.core.app.CoreComponentFactory { (); }
-keep class androidx.core.content.FileProvider { (); }
-keep class androidx.core.content.FileProvider4Utils { (); }
@@ -1090,10 +1090,10 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
-keepclassmembers class * { *** videoEditClick(android.view.View); }
-# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\app\build\intermediates\aapt_proguard_file\release\processReleaseResources\aapt_rules.txt
-# The proguard configuration file for the following section is C:\Users\58381\Documents\AndroidProject\pandorapan\lib_faceunity\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
+# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\app\build\intermediates\aapt_proguard_file\google_onlineRelease\processGoogle_onlineReleaseResources\aapt_rules.txt
+# The proguard configuration file for the following section is C:\Users\58381\Documents\AndroidProject\pandorapan\lib_faceunity\build\intermediates\consumer_proguard_dir\google_onlineRelease\exportGoogle_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
-# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\lib_faceunity\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
+# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\lib_faceunity\build\intermediates\consumer_proguard_dir\google_onlineRelease\exportGoogle_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\8d3e3177c15403546de73d87508067d6\transformed\jetified-XPopup-2.10.0\proguard.txt
# Generated keep rule for Lifecycle observer adapter.
-if class com.lxj.xpopup.core.BasePopupView {
@@ -1153,9 +1153,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
# End of content from C:\gradle-6.1.1\caches\transforms-3\a1df9a6aa192455030f7c9970b70e0e9\transformed\material-1.4.0\proguard.txt
-# The proguard configuration file for the following section is C:\Users\58381\Documents\AndroidProject\pandorapan\lib_google\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
+# The proguard configuration file for the following section is C:\Users\58381\Documents\AndroidProject\pandorapan\lib_google\build\intermediates\consumer_proguard_dir\google_onlineRelease\exportGoogle_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
-# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\lib_google\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
+# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\lib_google\build\intermediates\consumer_proguard_dir\google_onlineRelease\exportGoogle_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\2929985d9627ba3bb45a0ebd18eaf9d3\transformed\jetified-linesdk-5.0.1\proguard.txt
-keepattributes *Annotation*
diff --git a/build.gradle b/build.gradle
index 67466e7ed..0c4e14aba 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "config.gradle"
apply from: "dependencies.gradle"
-
+apply from: "config.gradle"
buildscript {
ext.kotlin_version = '1.8.22'
@@ -50,9 +50,9 @@ allprojects {
}
}
-task clean(type: Delete) {
+/*task clean(type: Delete) {
delete rootProject.buildDir
-}
+}*/
ext {
IS_PUBLISH_LOCAL=true
LIB_VERSION="1.0.6"
diff --git a/common/build.gradle b/common/build.gradle
index 5d48a76cd..ae8da9404 100644
--- a/common/build.gradle
+++ b/common/build.gradle
@@ -1,11 +1,12 @@
apply plugin: 'com.android.library'
apply plugin: 'img-optimizer'
apply plugin: 'kotlin-android'
-
+apply from: "../package_config.gradle"
android {
namespace "com.yunbao.common"
compileSdk rootProject.ext.android.compileSdkVersion
+ publishNonDefault true
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
diff --git a/config.gradle b/config.gradle
index de86dd339..7606a2726 100644
--- a/config.gradle
+++ b/config.gradle
@@ -12,7 +12,7 @@ ext {
//正式、
serverHost : "https://napi.yaoulive.com",
// 测试
-// serverHost : "https://ceshi.yaoulive.com",
+ testServerHost : "https://ceshi.yaoulive.com",
buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")),
//百度语音识别
diff --git a/lib_country_code/build.gradle b/lib_country_code/build.gradle
index d79070cf8..e604896b1 100644
--- a/lib_country_code/build.gradle
+++ b/lib_country_code/build.gradle
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'img-optimizer'
-
+apply from: "../package_config.gradle"
android {
namespace "com.sahooz.library"
diff --git a/lib_faceunity/build.gradle b/lib_faceunity/build.gradle
index 0f46c98d1..e508cc23c 100644
--- a/lib_faceunity/build.gradle
+++ b/lib_faceunity/build.gradle
@@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'kotlin-android'
+apply from: "../package_config.gradle"
android {
namespace "com.yunbao.swfaceunity"
@@ -46,6 +47,7 @@ dependencies {
// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
+/*
afterEvaluate {
publishing {
publications {
@@ -78,4 +80,4 @@ afterEvaluate {
}
}
}
-}
\ No newline at end of file
+}*/
diff --git a/lib_google/build.gradle b/lib_google/build.gradle
index b2b45bc83..b77de1034 100644
--- a/lib_google/build.gradle
+++ b/lib_google/build.gradle
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
+apply from: "../package_config.gradle"
android {
namespace "com.shayu.lib_google"
diff --git a/lib_huawei/build.gradle b/lib_huawei/build.gradle
index 9755b0a61..20b93e0a2 100644
--- a/lib_huawei/build.gradle
+++ b/lib_huawei/build.gradle
@@ -1,9 +1,10 @@
apply plugin: 'com.android.library'
+apply from: "../package_config.gradle"
android {
- namespace "com.shayu.lib_huawei"
- compileSdk rootProject.ext.android.compileSdkVersion
- targetSdk rootProject.ext.android.buildToolsVersion
+ namespace "com.yunbao.huawei"
+ compileSdkVersion rootProject.ext.android.compileSdkVersion
+ buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion minSdkVersion
@@ -21,8 +22,8 @@ android {
}
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_18
- targetCompatibility JavaVersion.VERSION_18
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
}
}
diff --git a/live/build.gradle b/live/build.gradle
index 6de375023..3b086c28a 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"
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(path:':FaceUnity')//融云-新娱美颜
api project(path:':common')//公共库
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'
apply from: "../package_config.gradle"
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(path:':FaceUnity')//融云-新娱美颜
api project(path:':common')//公共库
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 ba304dc16..535b902ab 100644
--- a/main/build.gradle
+++ b/main/build.gradle
@@ -1,5 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'img-optimizer'
+apply from: "../package_config.gradle"
android {
namespace "com.yunbao.main"
diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java
index a4f390768..def2d4e70 100644
--- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java
+++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java
@@ -211,6 +211,9 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
});
} else {
pp = 0;
+ if(select==0){
+ select = list.get(0).getId();
+ }
MainHttpUtil.getClassLive(select, p, callback);
}
}
diff --git a/package_config.gradle b/package_config.gradle
new file mode 100644
index 000000000..bb72fe23f
--- /dev/null
+++ b/package_config.gradle
@@ -0,0 +1,43 @@
+android{
+ flavorDimensions 'packageApk'
+ productFlavors {
+ link_test {
+ dimension 'packageApk'
+ manifestPlaceholders = [
+ serverHost : rootProject.ext.manifestPlaceholders.testServerHost,
+ isGooglePlay : 0,
+ isUploadLog : true,
+ isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
+ ]
+ }
+ link_online {
+ dimension 'packageApk'
+ manifestPlaceholders = [
+ serverHost : rootProject.ext.manifestPlaceholders.serverHost,
+ isGooglePlay : 0,
+ isUploadLog : true,
+ isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
+ ]
+ }
+ google_test {
+ dimension 'packageApk'
+ manifestPlaceholders = [
+ serverHost : rootProject.ext.manifestPlaceholders.testServerHost,
+ isGooglePlay : 1,
+ isUploadLog : true,
+ isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
+ ]
+ }
+ google_online {
+ dimension 'packageApk'
+ manifestPlaceholders = [
+ serverHost : rootProject.ext.manifestPlaceholders.serverHost,
+ isGooglePlay : 1,
+ isUploadLog : true,
+ isPluginModel: rootProject.ext.manifestPlaceholders.isPluginModel
+ ]
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index bc9277453..7782d10b9 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -4,7 +4,7 @@ include ':FaceUnity'
//include ':recognizer'//融云语音转文字模块
include ':Share'
include ':pluginsForAnchor'
-//include ':lib_huawei'
+include ':lib_huawei'
include ':lib_google'
//include ':IAP6Helper'
include ':lib_faceunity'
\ No newline at end of file
diff --git a/video/build.gradle b/video/build.gradle
index 12847c487..7ddef9284 100644
--- a/video/build.gradle
+++ b/video/build.gradle
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'img-optimizer'
-
+apply from: "../package_config.gradle"
android {
namespace "com.yunbao.video"