2022-07-18 15:31:45 +08:00
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
apply plugin: 'img-optimizer'
|
|
|
|
|
apply plugin: 'com.google.gms.google-services'
|
2022-10-24 17:55:43 +08:00
|
|
|
|
apply plugin: 'com.google.firebase.crashlytics'
|
2022-11-10 11:17:04 +08:00
|
|
|
|
apply plugin: 'com.alibaba.arouter'
|
2024-06-20 14:02:15 +08:00
|
|
|
|
apply from: "../package_config.gradle"
|
2024-06-27 14:28:33 +08:00
|
|
|
|
|
2022-07-18 15:31:45 +08:00
|
|
|
|
android {
|
2024-07-13 10:37:37 +08:00
|
|
|
|
namespace "myname.pdlive.shayu"
|
|
|
|
|
compileSdk rootProject.ext.android.compileSdkVersion
|
2022-07-18 15:31:45 +08:00
|
|
|
|
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"
|
2022-10-20 10:49:08 +08:00
|
|
|
|
//旧美颜so
|
|
|
|
|
exclude 'lib/arm64-v8a/libxeengine.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_base.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcrypto.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libMNN.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libc++_shared.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_base.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_beauty.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_bodylandmark.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_express.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_faceattributes.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_facefeatures.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_faceprocessor.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_facerecognition.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_handgesture.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_imagequality.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_objectdetect.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_segmentation.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmcv_api_videoprocessor.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libmmlic.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libMNN_CL.so'
|
|
|
|
|
exclude 'lib/arm64-v8a/libMNN_Express.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libxeengine.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_base.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcrypto.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libMNN.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libc++_shared.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_base.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_beauty.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_bodylandmark.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_express.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_faceattributes.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_facefeatures.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_faceprocessor.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_facerecognition.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_handgesture.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_imagequality.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_objectdetect.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_segmentation.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmcv_api_videoprocessor.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libmmlic.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libMNN_CL.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libMNN_Express.so'
|
2024-09-04 17:32:19 +08:00
|
|
|
|
|
|
|
|
|
if (rootProject.ext.manifestPlaceholders.isGooglePlay == 0) {
|
2024-09-24 18:20:38 +08:00
|
|
|
|
// 链接包剔除相心美颜SO
|
2023-06-14 17:59:08 +08:00
|
|
|
|
exclude 'lib/armeabi-v7a/libCNamaSDK.so'
|
|
|
|
|
exclude 'lib/armeabi-v7a/libfuai.so'
|
2024-09-24 18:20:38 +08:00
|
|
|
|
|
|
|
|
|
exclude 'lib/arm64-v8a/libCNamaSDK.so'
|
2023-06-14 17:59:08 +08:00
|
|
|
|
exclude 'lib/arm64-v8a/libfuai.so'
|
2024-09-24 18:20:38 +08:00
|
|
|
|
|
|
|
|
|
/* // 剔除声网X86架构的so
|
|
|
|
|
exclude 'lib/x86/libagora-core.so'
|
|
|
|
|
exclude 'lib/x86/libagora-ffmpeg.so'
|
|
|
|
|
exclude 'lib/x86/libagora-fdkaac.so'
|
|
|
|
|
exclude 'lib/x86/libagora-soundtouch.so'
|
|
|
|
|
exclude 'lib/x86/libagora-rtc-sdk.so'
|
|
|
|
|
|
|
|
|
|
*//* exclude 'lib/x86/libagora_ai_echo_cancellation_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_ai_noise_suppression_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_audio_beauty_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_clear_vision_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_content_inspect_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_face_detection_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_face_capture_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_lip_sync_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_screen_capture_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_segmentation_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_spatial_audio_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_video_av1_decoder_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_video_decoder_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_video_encoder_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_video_quality_analyzer_extension.so'
|
|
|
|
|
exclude 'lib/x86/libagora_video_dec.so'
|
|
|
|
|
exclude 'lib/x86/libagora_video_enc.so'*//*
|
|
|
|
|
|
|
|
|
|
exclude 'lib/x86_64/libagora-core.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora-ffmpeg.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora-fdkaac.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora-soundtouch.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora-rtc-sdk.so'
|
|
|
|
|
|
|
|
|
|
*//* exclude 'lib/x86_64/libagora_clear_vision_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_segmentation_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_screen_capture_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_audio_beauty_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_spatial_audio_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_video_decoder_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_video_encoder_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_video_av1_decoder_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_content_inspect_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_video_quality_analyzer_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_face_detection_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_face_capture_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_ai_noise_suppression_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_ai_echo_cancellation_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_lip_sync_extension.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_video_dec.so'
|
|
|
|
|
exclude 'lib/x86_64/libagora_video_enc.so'*/
|
|
|
|
|
|
|
|
|
|
|
2023-06-14 17:59:08 +08:00
|
|
|
|
}
|
2022-07-18 15:31:45 +08:00
|
|
|
|
}
|
2024-09-24 18:20:38 +08:00
|
|
|
|
|
2022-07-18 15:31:45 +08:00
|
|
|
|
compileOptions {
|
2024-09-13 16:04:26 +08:00
|
|
|
|
sourceCompatibility JavaVersion.VERSION_18
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_18
|
2024-07-13 10:37:37 +08:00
|
|
|
|
}
|
|
|
|
|
buildFeatures {
|
|
|
|
|
buildConfig = true
|
2022-07-18 15:31:45 +08:00
|
|
|
|
}
|
2024-06-20 14:02:15 +08:00
|
|
|
|
|
2022-10-13 16:07:52 +08:00
|
|
|
|
applicationVariants.all { variant ->
|
2023-06-15 13:41:57 +08:00
|
|
|
|
println "清空build文件夹";
|
2024-06-29 10:11:42 +08:00
|
|
|
|
for (final def project in rootProject.getAllprojects()) {
|
2024-06-20 14:02:15 +08:00
|
|
|
|
def name = variant.name.replace('Debug', '').replace('Release', '').toLowerCase()
|
2024-06-29 10:11:42 +08:00
|
|
|
|
//delete project.buildDir
|
2024-06-27 14:28:33 +08:00
|
|
|
|
delete project.rootDir.absolutePath+File.separator+"app"+File.separator+name
|
2024-06-29 10:11:42 +08:00
|
|
|
|
//println project.buildDir
|
|
|
|
|
}
|
2024-06-27 14:28:33 +08:00
|
|
|
|
//delete project.rootDir.absolutePath + File.separator + "outputs"
|
2022-10-13 16:07:52 +08:00
|
|
|
|
String variantName = variant.name.capitalize()
|
|
|
|
|
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
|
2022-10-20 10:49:08 +08:00
|
|
|
|
processManifestTask.doLast { pm ->
|
2024-08-16 14:22:58 +08:00
|
|
|
|
// String manifestPath = "build/intermediates/bundle_manifest/google_onlineRelease/bundle-manifest/AndroidManifest.xml"
|
2024-08-21 17:04:50 +08:00
|
|
|
|
String manifestPath = "build/intermediates/merged_manifests/${variant.name}/process${variantName}Manifest/AndroidManifest.xml"
|
|
|
|
|
def isGooglePlay = !variant.name.contains("link")
|
|
|
|
|
println "variant = ${variant.name}"
|
2024-05-08 09:52:35 +08:00
|
|
|
|
println "谷歌版本:" + isGooglePlay
|
|
|
|
|
println "文件存在" + file(manifestPath).exists()
|
2024-08-21 17:04:50 +08:00
|
|
|
|
println "" + (isGooglePlay)
|
2024-06-20 14:02:15 +08:00
|
|
|
|
println "" + (file(manifestPath).exists() && isGooglePlay)
|
|
|
|
|
if (file(manifestPath).exists() && isGooglePlay) {
|
2022-10-13 16:07:52 +08:00
|
|
|
|
def manifestContent = file(manifestPath).getText()
|
2024-05-08 09:52:35 +08:00
|
|
|
|
println "移除权限"
|
2022-10-13 18:29:23 +08:00
|
|
|
|
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
2024-05-08 09:52:35 +08:00
|
|
|
|
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
|
2022-10-13 16:07:52 +08:00
|
|
|
|
file(manifestPath).write(manifestContent)
|
2022-10-20 10:49:08 +08:00
|
|
|
|
} else {
|
|
|
|
|
print "not Exists = " + manifestPath
|
2022-10-13 16:07:52 +08:00
|
|
|
|
}
|
2024-06-20 14:02:15 +08:00
|
|
|
|
manifestPath = "build/intermediates/merged_manifests/google_onlineRelease/processReleaseManifest/AndroidManifest.xml"
|
|
|
|
|
if (file(manifestPath).exists() && isGooglePlay) {
|
2024-05-08 09:52:35 +08:00
|
|
|
|
def manifestContent = file(manifestPath).getText()
|
|
|
|
|
println "移除权限2"
|
|
|
|
|
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
|
|
|
|
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
|
|
|
|
|
file(manifestPath).write(manifestContent)
|
|
|
|
|
}
|
2022-10-19 16:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
variant.mergeAssetsProvider.configure {
|
|
|
|
|
doLast {
|
2023-11-28 18:28:47 +08:00
|
|
|
|
delete(fileTree(dir: outputDir, includes: ['model/ai_bgseg_green.bundle',
|
2024-04-18 09:47:38 +08:00
|
|
|
|
//'model/ai_face_processor.bundle',
|
2023-11-28 18:28:47 +08:00
|
|
|
|
//'model/ai_face_processor_lite.bundle',
|
|
|
|
|
'model/ai_hairseg.bundle',
|
|
|
|
|
'model/ai_hand_processor.bundle',
|
|
|
|
|
'model/ai_human_processor.bundle',
|
|
|
|
|
'model/ai_human_processor_gpu.bundle',
|
|
|
|
|
'model/ai_human_processor_mb_fast.bundle',
|
|
|
|
|
'graphics/body_slim.bundle',
|
|
|
|
|
'graphics/controller_cpp.bundle',
|
|
|
|
|
//'graphics/face_beautification.bundle',
|
|
|
|
|
'graphics/face_makeup.bundle',
|
|
|
|
|
'graphics/fuzzytoonfilter.bundle',
|
|
|
|
|
'graphics/fxaa.bundle',
|
|
|
|
|
'graphics/tongue.bundle',
|
|
|
|
|
//旧美颜
|
|
|
|
|
'model-all.zip',
|
|
|
|
|
'filterData.zip',
|
|
|
|
|
'KSYResource/*',
|
|
|
|
|
'Resources/*',
|
|
|
|
|
'Asset/*',
|
|
|
|
|
'image_effect_shaders/*',
|
|
|
|
|
'internal/*'
|
|
|
|
|
//美颜基础组件
|
2023-06-14 17:59:08 +08:00
|
|
|
|
|
2022-10-19 16:19:50 +08:00
|
|
|
|
]))
|
2023-06-15 13:41:57 +08:00
|
|
|
|
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
|
|
|
|
|
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
2024-04-18 09:47:38 +08:00
|
|
|
|
delete(fileTree(dir: outputDir, includes: ['model/ai_face_processor.bundle',
|
2023-11-28 18:28:47 +08:00
|
|
|
|
'graphics/face_beautification.bundle']))
|
2023-06-15 13:41:57 +08:00
|
|
|
|
} else {
|
2023-06-14 17:59:08 +08:00
|
|
|
|
println "不删除bundle"
|
|
|
|
|
}
|
2022-10-19 16:19:50 +08:00
|
|
|
|
}
|
2022-10-13 16:07:52 +08:00
|
|
|
|
}
|
2024-06-27 14:28:33 +08:00
|
|
|
|
variant.assemble.doLast { vt ->
|
2024-06-20 14:02:15 +08:00
|
|
|
|
def channel = ''
|
2024-06-27 14:28:33 +08:00
|
|
|
|
def server = ''
|
|
|
|
|
if (variant.name.contains('huawei')) {
|
2024-06-20 14:02:15 +08:00
|
|
|
|
channel = "华为"
|
2024-06-27 14:28:33 +08:00
|
|
|
|
} else if (variant.name.contains('samsung')) {
|
2024-06-20 14:02:15 +08:00
|
|
|
|
channel = "三星"
|
2024-06-27 14:28:33 +08:00
|
|
|
|
} else if (variant.name.contains('google')) {
|
2024-06-20 14:02:15 +08:00
|
|
|
|
channel = "谷歌"
|
|
|
|
|
} else {
|
|
|
|
|
channel = "链接"
|
2023-06-15 13:41:57 +08:00
|
|
|
|
}
|
2024-06-27 14:28:33 +08:00
|
|
|
|
if (variant.name.contains('online')) {
|
|
|
|
|
server = '正式服'
|
|
|
|
|
} else {
|
|
|
|
|
server = '测试服'
|
2023-06-15 13:41:57 +08:00
|
|
|
|
}
|
2024-06-27 14:28:33 +08:00
|
|
|
|
def fileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${defaultConfig.versionCode}-${channel}-${server}-${variant.buildType.name}.apk"
|
|
|
|
|
variant.outputs.forEach { fe ->
|
|
|
|
|
copy {
|
|
|
|
|
from fe.outputFile
|
|
|
|
|
into file("${project.rootDir}\\outputs\\apk\\")
|
|
|
|
|
rename { fn ->
|
|
|
|
|
fileName
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-20 14:02:15 +08:00
|
|
|
|
}
|
|
|
|
|
tasks.named("sign${variant.name.capitalize()}Bundle", com.android.build.gradle.internal.tasks.FinalizeBundleTask) {
|
|
|
|
|
File file = finalBundleFile.asFile.get()
|
|
|
|
|
def channel = ''
|
2024-06-27 14:28:33 +08:00
|
|
|
|
def server = ''
|
2024-06-20 14:02:15 +08:00
|
|
|
|
if (variant.name.startsWith('huawei')) {
|
|
|
|
|
channel = "华为"
|
|
|
|
|
} else if (variant.name.startsWith('samsung')) {
|
|
|
|
|
channel = "三星"
|
|
|
|
|
} else if (variant.name.startsWith('google')) {
|
|
|
|
|
channel = "谷歌"
|
|
|
|
|
} else {
|
|
|
|
|
channel = "链接"
|
|
|
|
|
}
|
2024-06-27 14:28:33 +08:00
|
|
|
|
if (variant.name.contains('online')) {
|
|
|
|
|
server = '正式服'
|
|
|
|
|
} else {
|
|
|
|
|
server = '测试服'
|
2023-06-15 13:41:57 +08:00
|
|
|
|
}
|
2024-06-27 14:28:33 +08:00
|
|
|
|
def fileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${defaultConfig.versionCode}-${channel}-${server}-${variant.buildType.name}.aab"
|
|
|
|
|
File finalFile = new File("${project.rootDir}\\outputs\\aab", fileName)
|
|
|
|
|
finalBundleFile.set(finalFile)
|
2023-06-15 13:41:57 +08:00
|
|
|
|
}
|
2022-10-13 16:07:52 +08:00
|
|
|
|
}
|
2022-07-18 15:31:45 +08:00
|
|
|
|
signingConfigs {
|
|
|
|
|
release {
|
|
|
|
|
keyAlias 'phonelive'
|
|
|
|
|
keyPassword 'phonelive'
|
|
|
|
|
storeFile file('../hdl.jks')
|
|
|
|
|
storePassword 'phonelive'
|
|
|
|
|
}
|
|
|
|
|
//陌陌本地配置需要
|
|
|
|
|
config {//TODO BEAUTYSDK 这里需要配置keystore相关信息
|
|
|
|
|
keyAlias 'phonelive'
|
|
|
|
|
keyPassword 'phonelive'
|
|
|
|
|
storeFile file('../hdl.jks')//keystore的存放路径
|
|
|
|
|
storePassword 'phonelive'
|
|
|
|
|
v2SigningEnabled true // android 5.0-8.0,必须用V2,否则会有安全问题
|
|
|
|
|
v1SigningEnabled true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
aaptOptions {
|
|
|
|
|
cruncherEnabled = false
|
|
|
|
|
useNewCruncher = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
packagingOptions {//加上这写代码 为了mob兼容性androidx
|
2022-10-20 10:49:08 +08:00
|
|
|
|
// pickFirst 'META-INF/*'
|
2022-07-18 15:31:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
// applicationId "myname.pdlive.shayu"
|
|
|
|
|
applicationId "com.pdlive.shayu"
|
|
|
|
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
|
|
|
|
//版本在这里修改
|
|
|
|
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
|
|
|
|
versionCode rootProject.ext.android.versionCode
|
|
|
|
|
versionName rootProject.ext.android.versionName
|
|
|
|
|
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
|
|
|
|
multiDexEnabled true
|
|
|
|
|
ndk {
|
2024-06-27 14:28:33 +08:00
|
|
|
|
Gradle gradle = getGradle()
|
|
|
|
|
String tskReqStr = gradle.getStartParameter().getTaskRequests().args.toString()
|
|
|
|
|
println("处理ndk 版本 = " + tskReqStr)
|
|
|
|
|
def isLink = tskReqStr.contains("Link")
|
2024-07-25 15:00:05 +08:00
|
|
|
|
if (isLink) {//移除32位so库可以有效降低包体大小,等需要时再弄
|
2024-09-24 18:20:38 +08:00
|
|
|
|
// abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
|
|
|
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
2024-06-27 14:28:33 +08:00
|
|
|
|
println("打包ndk 链接")
|
|
|
|
|
} else {
|
2024-09-02 18:32:06 +08:00
|
|
|
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
|
|
|
|
// abiFilters "arm64-v8a"
|
2024-06-27 14:28:33 +08:00
|
|
|
|
println("打包ndk其他")
|
|
|
|
|
}
|
2022-07-18 15:31:45 +08:00
|
|
|
|
}
|
|
|
|
|
javaCompileOptions {
|
|
|
|
|
annotationProcessorOptions {
|
|
|
|
|
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
buildTypes {
|
|
|
|
|
release {
|
2023-05-08 13:29:24 +08:00
|
|
|
|
minifyEnabled true
|
2023-05-09 10:09:03 +08:00
|
|
|
|
shrinkResources true
|
|
|
|
|
zipAlignEnabled true
|
2022-07-18 15:31:45 +08:00
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
|
}
|
|
|
|
|
debug {
|
2023-06-14 13:41:12 +08:00
|
|
|
|
minifyEnabled false
|
|
|
|
|
shrinkResources false
|
|
|
|
|
zipAlignEnabled false
|
2023-05-08 13:29:24 +08:00
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2022-07-18 15:31:45 +08:00
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
lintOptions {
|
|
|
|
|
checkReleaseBuilds false
|
|
|
|
|
abortOnError false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
flatDir {
|
|
|
|
|
dirs 'libs', '../libs'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
2022-10-24 17:55:43 +08:00
|
|
|
|
|
2023-11-27 17:12:27 +08:00
|
|
|
|
//implementation platform('com.google.firebase:firebase-bom:30.5.0')
|
|
|
|
|
//implementation 'com.google.firebase:firebase-crashlytics'
|
2022-10-24 17:55:43 +08:00
|
|
|
|
|
2022-07-18 15:31:45 +08:00
|
|
|
|
//直播
|
|
|
|
|
api project(':main')
|
|
|
|
|
//短视频
|
|
|
|
|
api project(':video')
|
2022-09-26 17:18:07 +08:00
|
|
|
|
|
2022-07-18 15:31:45 +08:00
|
|
|
|
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
2022-08-26 13:00:45 +08:00
|
|
|
|
|
2022-10-20 10:49:08 +08:00
|
|
|
|
// implementation rootProject.ext.dependencies["leakcanary"]
|
2022-12-05 17:44:49 +08:00
|
|
|
|
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
|
2022-09-09 13:36:01 +08:00
|
|
|
|
|
2022-08-26 13:00:45 +08:00
|
|
|
|
|
2024-06-27 14:28:33 +08:00
|
|
|
|
}
|