import com.android.build.api.dsl.VariantDimension import com.android.build.api.variant.BuildConfigField /* * Copyright (c) 2022 NetEase, Inc. All rights reserved. * Use of this source code is governed by a MIT license that can be found in the LICENSE file. */ plugins { id("com.android.application") id("com.google.gms.google-services") id("com.huawei.agconnect") } android { signingConfigs { // getByName("debug") { // storeFile = file("..\\dsjk_keystore.jks") // storePassword = "123456" // keyAlias = "key0" // keyPassword = "123456" // } create("release") { storeFile = file("..\\dsjk_keystore.jks") storePassword = "123456" keyAlias = "key0" keyPassword = "123456" } } lint { // i如果为 true,则在发现错误时停止 gradle 构建 abortOnError = false // 设置为 true 以使所有发布版本针对严重性=致命的问题运行 lint,如果发现致命问题, // 则中止生成(由上面的 abortOnError 控制) checkReleaseBuilds = false } compileSdk = 34 defaultConfig { manifestPlaceholders += mapOf() applicationId = "com.dskj.rbchat" minSdk = 24 targetSdk = 34 versionCode = 192 versionName = "1.9.2" multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f" //正式 // manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a" //测试 manifestPlaceholders["JPUSH_PKGNAME"] = "com.dskj.rbchat" manifestPlaceholders["JPUSH_APPKEY"] = "9041bc22de91e3d9af3cfd23" manifestPlaceholders["JPUSH_CHANNEL"] = "developer-default" ndk { abiFilters += listOf("armeabi-v7a", "arm64-v8a") } } buildTypes { getByName("release") { isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) signingConfig = signingConfigs.getByName("release") isDebuggable = false; // buildConfigField( // "String", // "HTTPS_BASE_URL", // "\"https://api.letschat2023.com/\"" // ) buildConfigField( "String", "APIKEY", "\"AIzaSyB7P1o1EIA02eWoNP_7QJ9XwWe3WkSZb9k\"" ) //正式服 manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f" //正式 //manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a" } getByName("debug") { isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) signingConfig = signingConfigs.getByName("release") isDebuggable = true // buildConfigField( // "String", // "HTTPS_BASE_URL", // "\"https://api-test.letschat2023.com/\"" // ) buildConfigField( "String", "APIKEY", "\"AIzaSyB7P1o1EIA02eWoNP_7QJ9XwWe3WkSZb9k\"" ) //测试APPKEY manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a" // manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f" } lint { baseline = file("lint-baseline.xml") } } buildFeatures { viewBinding = true } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } packagingOptions { jniLibs.pickFirsts.add("lib/arm64-v8a/libc++_shared.so") jniLibs.pickFirsts.add("lib/armeabi-v7a/libc++_shared.so") } namespace = "com.dskj.rbchat" // applicationVariants.all { // compileConfiguration.resolutionStrategy { // // } // // runtimeConfiguration.resolutionStrategy { // // } // } configurations { all { exclude(group = "com.google.guava", module = "listenablefuture") } } } dependencies { val room_version = "2.4.3" implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar", "*.aar")))) implementation("androidx.appcompat:appcompat:1.6.1") implementation("com.google.android.material:material:1.8.0") implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation("androidx.multidex:multidex:2.0.1") //local module code implementation(project(":contactkit-ui")) implementation(project(":conversationkit-ui")) implementation(project(":teamkit-ui")) implementation(project(":chatkit-ui")) implementation(project(":locationkit")) implementation(project(":fingermanager")) // implementation(project(":citypickerview")) // implementation("com.netease.yunxin.kit.contact:contactkit-ui:9.6.2") // implementation("com.netease.yunxin.kit.conversation:conversationkit-ui:9.6.2") // implementation("com.netease.yunxin.kit.team:teamkit-ui:9.6.2") // implementation("com.netease.yunxin.kit.chat:chatkit-ui:9.6.2") // implementation("com.netease.yunxin.kit.locationkit:locationkit:9.6.2") implementation("com.netease.yunxin.kit.call:call-ui:1.8.2") //呼叫组件 UI 包 api("com.netease.nimlib:avsignalling:9.11.0") //呼叫组件 依赖信令包 api("com.netease.nimlib:basesdk:9.11.0") //IM SDK implementation("com.airbnb.android:lottie:5.0.3") implementation("com.github.bumptech.glide:glide:4.13.1") implementation("jp.wasabeef:glide-transformations:4.3.0") //retrofit2 implementation("com.squareup.retrofit2:retrofit:2.9.0") implementation("com.squareup.retrofit2:converter-gson:2.9.0") implementation("com.squareup.retrofit2:converter-scalars:2.9.0") implementation("com.squareup.okhttp3:okhttp:4.9.3") implementation("com.huawei.hms:push:6.3.0.302") { exclude(group = "com.huawei.hms", module = "update") // com.huawei.hms:update exclude(group = "com.huawei.hms", module = "availableupdate") // com.huawei.hms:update } implementation("com.meizu.flyme.internet:push-internal:4.1.0") implementation("com.huawei.agconnect:agconnect-core:1.6.5.300") // Hilt 对于ViewModel的支持 implementation("androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha02") implementation("androidx.hilt:hilt-compiler:1.0.0-alpha02") implementation("com.google.code.gson:gson:2.9.0") implementation("commons-codec:commons-codec:1.10") implementation("androidx.annotation:annotation:1.3.0") //smartrefresh implementation("io.github.scwang90:refresh-layout-kernel:2.0.6") //核心必须依赖 implementation("io.github.scwang90:refresh-header-classics:2.0.6") //经典刷新头 implementation("io.github.scwang90:refresh-header-material:2.0.6") //谷歌刷新头 implementation("io.github.scwang90:refresh-footer-classics:2.0.6") //经典加载 // implementation("com.ethanhua:skeleton:1.1.2") // implementation("io.supercharge:shimmerlayout:2.1.0") // implementation("com.github.lzyzsd:jsbridge:1.0.4") implementation("com.tencent.bugly:crashreport:4.0.4") implementation("com.google.firebase:firebase-messaging:23.0.5") // implementation("com.google.firebase:firebase-analytics:20.0.0") implementation(platform("com.google.firebase:firebase-bom:32.3.1")) //skeleton implementation("com.github.ethanhua:Skeleton:ff06517d4629e87328c41a1cce614c490ed7fb51") implementation("io.supercharge:shimmerlayout:2.1.0") //jsbridge implementation("com.github.lzyzsd:jsbridge:1.0.4") implementation("com.smallbuer:jsbridge:1.0.7") //华为scanplus implementation("com.huawei.hms:scanplus:2.12.0.301") implementation("com.tencent.mm.opensdk:wechat-sdk-android:6.8.0") implementation("com.youth.banner:banner:1.4.9") implementation("com.github.iwgang:simplifyspan:2.1") implementation("io.github.hariprasanths:bounceview-android:0.2.0") // implementation("com.contrarywind:Android-PickerView:4.1.9") implementation("com.aliyun.dpa:oss-android-sdk:2.9.13") implementation("com.github.jenly1314:zxing-lite:2.1.1") implementation("com.blankj:utilcodex:1.31.0") // implementation("com.github.jenly1314.AppUpdater:app-updater:1.1.3") implementation("cn.jiguang.sdk:jpush:5.0.7") // 必选,此处以JPush 5.0.7 版本为例,注意:5.0.0 版本开始可以自动拉取 JCore 包,无需另外配置 implementation("cn.jiguang.sdk.plugin:fcm:5.0.7") implementation("cn.jiguang.sdk:joperate:2.0.2") // 可选,集成极光分析SDK后,即可支持行为触发推送消息、推送转化率统计,用户行为分析和用户标签等功能 implementation("com.github.SherlockGougou:BigImageViewPager:androidx-7.2.5") annotationProcessor("com.github.bumptech.glide:compiler:4.11.0") implementation("com.google.android.gms:play-services-location:21.0.1") implementation("com.google.android.gms:play-services-maps:18.2.0") // implementation("com.gitee.sakaue:QSVideoPayer:2.2.9") // implementation("tv.danmaku.ijk.media:ijkplayer-armv5:0.8.8") // implementation("tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8") implementation("androidx.room:room-runtime:$room_version") annotationProcessor("androidx.room:room-compiler:$room_version") // optional - RxJava2 support for Room implementation("androidx.room:room-rxjava2:$room_version") // optional - Paging 3 Integration implementation("androidx.room:room-paging:$room_version") // implementation("com.esotericsoftware.spine:spine-libgdx:4.1.00") // implementation("com.esotericsoftware:spine-runtimes:+") }