Files
yusheng-android/app/build.gradle
梁小江 8f4c2d1b83 1:优化服务地址
2:修改盲盒转盘声音,修改成0.2
3:修改红包声音,0.2
4:修改巡乐会,最后出现的空白
5:优化一键赠送背包礼物的时候,连续点击后,出现的错误
7:修改打包的应用图标
2026-01-13 16:04:21 +08:00

219 lines
7.3 KiB
Groovy
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}
android {
// 1. 定义渠道维度(必须配置,否则报错)
flavorDimensions "environment"
namespace 'com.qxcm.qxlive'
compileSdk 35
bundle {
language {
enableSplit = false
}
}
defaultConfig {
applicationId "com.qxcm.qxlive"
minSdk 24
targetSdk 33
versionCode Integer.parseInt(project.findProperty("APP_VERSION_CODE"))
versionName project.findProperty("APP_VERSION_NAME")
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//设置支持的so库
// abiFilters 'arm64-v8a', 'armeabi','arm64'
abiFilters 'arm64-v8a', 'armeabi-v7a'
}
javaCompileOptions {
annotationProcessorOptions {
arguments = [
AROUTER_MODULE_NAME: project.getName()
]
}
}
// 【默认图标占位符】后续会被渠道配置覆盖
manifestPlaceholders = [
icon: "@mipmap/ic_launcher" // 默认图标main目录下的图标
]
// signingConfig signingConfigs.release
// proguardFiles 'proguard-rules.pro'
}
// 2. 配置测试版和正式版渠道
productFlavors {
// 正式版配置
releas {
dimension "environment"
// 正式版包名使用基础包名com.example.myapp
applicationIdSuffix ""
// // 测试版包名:基础包名 + .betacom.example.myapp.beta
applicationIdSuffix ".beta"
// 【正式版应用名称】通过resValue动态生成string资源
resValue "string", "app_name", "羽声内测"
// resValue "string", "app_name", "羽声语音APP"
// 【正式版图标】替换manifest中的占位符使用main目录下的正式图标
manifestPlaceholders = [
appIcon: "@mipmap/icon_nc" // 需在main/res/mipmap放置该图标
]
}
// // 测试版配置
beta {
dimension "environment"
// // 测试版包名:基础包名 + .betacom.example.myapp.beta
// applicationIdSuffix ".beta"
// // 测试版版本名1.0-beta
// versionNameSuffix "-beta"
//
// // 【测试版应用名称】动态生成带标识的名称
resValue "string", "app_name", "羽声-测试版"
//
// // 【测试版图标】替换为测试专用图标
manifestPlaceholders = [
appIcon: "@mipmap/icon_nc" // 需在main/res/mipmap放置该图标
]
}
}
signingConfigs {
debug {
storeFile file("my-release-key.jks")
storePassword "123456"
keyAlias "mykey"
keyPassword "123456"
}
release {
storeFile file("my-release-key.jks")
storePassword "123456"
keyAlias "mykey"
keyPassword "123456"
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
applicationVariants.all { variant ->
if (variant.buildType.name == 'release') {
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def versionName = variant.versionName
def versionCode = variant.versionCode
// 获取当前时间戳格式yyyyMMddHHmmss
def buildTimes = new Date().format("yyyy-MM-dd-HH-mm")
def fileName = "yusheng_${versionName}_${versionCode}_${buildTimes}.apk"
output.outputFileName = fileName
}
}
}
}
}
debug {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
applicationVariants.all { variant ->
if (variant.buildType.name == 'debug') {
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def versionName = variant.versionName
def versionCode = variant.versionCode
def fileName = "app-debug-sr_${versionName}_${versionCode}.apk"
output.outputFileName = fileName
}
}
}
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
dataBinding true
}
dataBinding {
enabled = true
}
packagingOptions {
exclude 'META-INF/gradle/incremental.annotation.processors'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
// exclude 'lib/arm64-v8a/libagora-ffmpeg.so'
// exclude 'lib/arm64-v8a/libagora-fdkaac.so'
}
kotlinOptions {
jvmTarget = '17'
}
// dexOptions {
// dexInProcess true
// preDexLibraries true
// javaMaxHeapSize "6g"
// }
}
dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
// implementation fileTree(dir: '../LocalAar/aar_libs', include: ['*.jar', '*.aar'] dir: 'libs')
implementation libs.appcompat
implementation libs.material
implementation libs.activity
implementation libs.constraintlayout
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
implementation files('libs/auth_number_product-2.14.7-log-online-standard-cuum-release.aar')
implementation files('libs/logger-2.2.2-release.aar')
implementation files('libs/main-2.2.3-release.aar')
implementation files('libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar')
implementation files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
implementation(libs.arouter.api.v150)
//annotationProcessor
annotationProcessor libs.arouter.compiler
implementation project(':MainModule')
// implementation project(':modulevocal') // 必须
// annotationProcessor project(':modulevocal') // 关键!
// api project(":moduleUtil")
// api project(":moduleLogin")
//aar的名称例如WbCloudFaceLiveSdk-v6.0.0-1234567.aar填入'WbCloudFaceLiveSdk-v6.0.0-1234567'
// implementation(name: 'WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc', ext: 'aar')
////2. 云normal SDK
////aar的名称例如WbCloudNormal-v5.1.10-123456789.aar填入 'WbCloudNormal-v5.1.10-123456789.aar'
// implementation(name: 'WbCloudNormal-v5.1.10-4e3e198', ext: 'aar')
}