123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- //这些行指定了使用了哪些 Gradle 插件
- apply plugin: 'com.android.application'
- apply plugin: 'org.greenrobot.greendao'
- //配置了 Android 构建的各种参数。
- android {
- //修改构建版本和工具版本:
- compileSdkVersion rootProject.ext.compileSdkVersion
- buildToolsVersion rootProject.ext.buildToolsVersion
- //修改应用 ID 和版本信息:
- defaultConfig {
- applicationId "com.timichat.app"
- minSdkVersion rootProject.ext.minSdkVersion
- targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 202201230
- versionName "2.5.1"
- //指定了用于运行测试的测试运行器
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- //启用了 MultiDex 支持,允许应用支持多个 Dex 文件,用于处理应用中的方法数限制问题
- multiDexEnabled true
- //定义了构建配置字段,这些字段可以在 Java 代码中使用。
- buildConfigField("String", "FILE_PROVIDER_NAME", "\"com.timichat.app.FileProvider\"")
- //设置了 Android 清单文件中的占位符,允许在构建过程中动态替换清单文件中的值。
- manifestPlaceholders = [
- app_Id : "com.timichat.app",
- app_name : "TiMi语音",
- channel_id : "3",
- qq_app_id : "",
- map_api_key : "123123",
- ali_app_key : "123123",
- ali_app_secret: "123123"
- ]
- ndk {
- abiFilters 'armeabi-v7a'/*, 'arm64-v8a'*/
- }
- }
- // 配置了 Dex 编译选项,指定了 Java 堆大小
- dexOptions {
- javaMaxHeapSize "4g"
- }
- //配置了 GreenDAO 数据库框架
- greendao {
- schemaVersion 25
- daoPackage 'com.starbuds.app.entity.db'
- targetGenDir 'src/main/java'
- }
- //配置签名信息:
- signingConfigs {
- release {
- storeFile file('../boluojie123.keystore')
- storePassword "boluojie.china.com"
- keyAlias "boluojie"
- keyPassword "boluojie.china.com"
- v1SigningEnabled true
- v2SigningEnabled true
- }
- }
- //配置构建类型:
- buildTypes {
- debug {
- debuggable true
- minifyEnabled false
- shrinkResources false
- zipAlignEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- manifestPlaceholders = [
- ali_app_key : "123333347698",
- ali_app_secret: "123127635475506424ca142289274a0592e",
- channel_id : "123201"
- ]
- signingConfig signingConfigs.release
- }
- release {
- minifyEnabled true
- shrinkResources true
- zipAlignEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- flavorDimensions "xingya"
- //添加多渠道打包配置
- productFlavors {
- //渠道包
- timi {// timi
- dimension "xingya"
- signingConfig signingConfigs.release
- manifestPlaceholders = [
- app_Id : "com.timichat.app",
- app_name : "TiMi语音",
- channel_id : "261442100002816"
- ]
- }
- tm {
- dimension "xingya"
- signingConfig signingConfigs.release
- manifestPlaceholders = [
- app_Id : "com.timichat.app",
- app_name : "Tm语音",
- channel_id : "261442100002817"
- ]
- }
- }
- //自定义构建输出目录和文件名:
- android.applicationVariants.all { variant ->
- variant.outputs.all { output ->
- def outputFile = output.outputFile
- if (outputFile != null && outputFile.name.contains('release')) {
- //渠道名称
- def buildName = ""
- variant.productFlavors.each { product ->
- buildName = product.name
- }
- //获取每个打包产物
- variant.getPackageApplication().outputDirectory = new File("${project.getProjectDir()}/channel")
- outputFileName = "${buildName}-${variant.versionName}-${variant.versionCode}.apk"
- }
- }
- }
- //这里配置了不同渠道的资源文件和资产文件的路径,以确保每个渠道的资源都被正确使用。
- sourceSets {
- [timi,tm].each {
- sourceSets[it.name].res.srcDirs = ["src/channel/${it.name}/res"]
- sourceSets[it.name].assets.srcDirs = ["src/channel/${it.name}/assets"]
- }
- }
- //配置了 Lint 静态代码分析工具的选项。
- lintOptions {
- abortOnError false
- }
- //指定了 Java 源代码的兼容性,这里设置为 Java 8 兼容
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- }
- dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation fileTree(include: ['*.aar'], dir: 'libs')
- implementation project(':xlibrary')
- // implementation project(':tuikit')
- implementation project(':easyPhotos')
- implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
- implementation "com.jakewharton:butterknife:$rootProject.ext.butterknifeVersion"
- implementation "androidx.constraintlayout:constraintlayout:$rootProject.ext.androidxConstraintVersion"
- implementation "androidx.appcompat:appcompat:$rootProject.ext.androidxVersion"
- implementation 'com.google.android.material:material:1.3.0'
- annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.ext.butterknifeVersion"
- implementation "org.greenrobot:greendao:$rootProject.ext.greendaoVersion"
- implementation("com.github.yuweiguocn:GreenDaoUpgradeHelper:v$rootProject.ext.greendaoHelperVersion") {
- exclude module: 'support-annotations'
- }
- // implementation "com.android.support.constraint:constraint-layout:$rootProject.ext.constraintLayoutVersion"
- implementation 'com.qiniu:qiniu-android-sdk:7.3.12'
- implementation 'com.hyman:flowlayout-lib:1.1.2'
- implementation 'androidx.multidex:multidex:2.0.0'
- implementation 'com.github.hackware1993:MagicIndicator:1.5.0'
- implementation 'com.contrarywind:Android-PickerView:4.1.9'
- implementation 'me.jessyan:autosize:1.1.2'
- implementation 'cn.bingoogolapple:bga-qrcodecore:1.1.7@aar'
- implementation 'cn.bingoogolapple:bga-zxing:1.1.7@aar'
- implementation 'com.bigkoo:convenientbanner:2.0.5'
- implementation 'com.shizhefei:MultiTypeView:1.0.1'
- implementation('com.github.Yellow5A5:ClearScreenHelper:1.0.2') {
- exclude group: 'com.android.support'
- }
- implementation 'cn.jzvd:jiaozivideoplayer:7.4.0'
- implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
- implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
- implementation 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8'
- // 微信
- implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.5.8'
- // 华为支付
- // implementation 'com.huawei.android.hms:iap:2.6.3.306'
- // implementation 'com.huawei.android.hms:hwid::2.6.3.306'
- // implementation 'com.huawei.android.hms:push:2.6.3.306'
- // QQ
- implementation files('libs/open_sdk_r08e585d_lite.jar')
- // 图片压缩
- implementation 'top.zibin:Luban:1.1.8'
- // 图片裁剪
- implementation 'com.github.yalantis:ucrop:2.2.3'
- implementation 'com.github.yalantis:ucrop:2.2.3-native'
- // 高德定位
- implementation 'com.amap.api:location:4.8.0'
- implementation ("com.github.bumptech.glide:glide:$rootProject.ext.glideVersion") {
- exclude group: "com.android.support"
- }
- implementation "com.github.bumptech.glide:okhttp3-integration:$rootProject.ext.glideVersion"
- implementation "com.github.bumptech.glide:annotations:$rootProject.ext.glideVersion"
- annotationProcessor "com.github.bumptech.glide:compiler:$rootProject.ext.glideVersion"
- implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.12.0'
- // implementation "androidx.vectordrawable:vectordrawable-animated:1.1.0"
- // implementation "androidx.exifinterface:exifinterface:1.2.0"
- implementation 'jp.wasabeef:glide-transformations:4.1.0'
- implementation 'com.tencent.bugly:crashreport:3.1.0@aar'
- implementation 'com.tencent.bugly:nativecrashreport:3.7.1@aar'
- implementation 'com.airbnb.android:lottie:3.5.0'
- implementation 'com.github.yyued:SVGAPlayer-Android:2.5.14'
- implementation "io.github.tencent:vap:2.0.20"
- // implementation 'com.github.YvesCheung:SVGAGlidePlugin:4.9.3'
- implementation 'com.imuxuan:floatingview:1.6'
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'androidx.test.ext:junit:1.1.0'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
- implementation 'com.github.yujinzhao123:DoubleHeadedDragonBar:1.0.4'
- implementation 'com.hyman:flowlayout-lib:1.1.2'
- implementation 'com.github.cirno-poi:VerifyEditText:1.0.0'
- implementation 'com.aliyun.ams:alicloud-android-push:3.1.12'
- // implementation 'com.aliyun.ams:alicloud-android-third-push:3.1.0@aar'
- // implementation 'com.aliyun.ams:huawei-push:2.6.3.305'
- // implementation 'com.aliyun.ams:huawei-push-base:2.6.3.305'
- // implementation 'com.aliyun.ams:meizu-push:3.8.7.1'
- // implementation 'com.aliyun.ams:third_vivopush:2.9.0.1'
- implementation 'com.umeng.umsdk:common:9.4.0'// 必选
- implementation 'com.umeng.umsdk:asms:1.2.3'// 必选
- implementation 'com.umeng.umsdk:apm:1.3.1' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
- implementation 'cn.rongcloud.sdk:im_lib:4.0.3.13'
- implementation ('cn.rongcloud.sdk:im_kit:4.0.3.13'){
- exclude group: "androidx.media"
- exclude group: "androidx.legacy"
- // exclude group: "com.github.bumptech.glide"
- }
- // implementation ('cn.rongcloud.sdk:im_kit:5.1.0'){
- // exclude group: "com.github.bumptech.glide"
- // }
- // implementation 'io.agora.rtc:agora-rtc-sdk:1.0.0'
- // implementation 'com.github.zegolibrary:express-audio:2.10.0'
- implementation 'im.zego:express-audio:3.2.1'
- implementation 'com.google.android:flexbox:2.0.1'
- implementation 'com.tencent:mmkv-static:1.2.10'
- implementation 'com.github.MZCretin:ExpandableTextView:1.6.1-x'
- // implementation 'com.tencent.tbs.tbssdk:sdk:43939'
- implementation 'com.github.lzyzsd:jsbridge:1.0.4'
- // implementation 'com.github.wendux:DSBridge-Android:3.0-SNAPSHOT'
- // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.3'
- implementation 'com.tencent.tav:libpag:3.2.5.1'
- implementation 'cn.hutool:hutool-all:5.0.6'
- }
|