build.gradle 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. plugins {
  2. id 'com.android.application'
  3. //生成的proto文件路径
  4. //id 'com.google.protobuf'
  5. }
  6. android {
  7. namespace 'com.bogo.android'
  8. defaultConfig {
  9. applicationId "com.nb.imchat"
  10. minSdkVersion 26
  11. targetSdkVersion 35
  12. compileSdk 35
  13. versionCode 441
  14. versionName "4.4.1"
  15. /*
  16. 修改为自己的
  17. 接口服务地址
  18. */
  19. buildConfigField("String", "API_SERVER_URL", '"http://47.239.183.4:8080"')
  20. /*
  21. 修改为自己的
  22. messaging服务器IP和端口
  23. */
  24. buildConfigField("String", "MESSAGING_SERVER_HOST", '"47.239.183.4"')
  25. buildConfigField("Integer", "MESSAGING_SERVER_PORT", '8090')
  26. buildConfigField("String", "LIVEKIT_URI", '"wss://momo-2q5gw0rp.livekit.cloud"')
  27. buildConfigField("String", "KEEP_LIVE_URL", '"https://alidocs.dingtalk.com/i/p/e3RmQ8DYbk6BbXaP/docs/jQPRqwxd3NLWjlOvOLedJYK6lrGM4795?dontjump=true"')
  28. buildConfigField("String", "BUGLY_APP_ID", '"yours"')
  29. ndk {
  30. /*
  31. armeabi-v7a:32位 arm芯片安装包
  32. arm64-v8a: 64位 arm芯片安装包
  33. x86_64: 64位 x86芯片安装包
  34. x86: 32位 x86芯片安装包
  35. 一般模拟器和需要配置X86
  36. */
  37. abiFilters "armeabi-v7a","arm64-v8a" /*,"x86","x86_64" */
  38. }
  39. javaCompileOptions {
  40. annotationProcessorOptions {
  41. arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
  42. }
  43. }
  44. }
  45. /*
  46. 请生成您自己的证书,然后修改如下配置
  47. */
  48. signingConfigs {
  49. debug {
  50. storeFile file('../fir.jks')
  51. storePassword '123654.Abc'
  52. keyAlias 'imchat'
  53. keyPassword '123654.Abc'
  54. }
  55. release {
  56. storeFile file('../fir.jks')
  57. storePassword '123654.Abc'
  58. keyAlias 'imchat'
  59. keyPassword '123654.Abc'
  60. }
  61. }
  62. buildTypes {
  63. release {
  64. signingConfig signingConfigs.release
  65. shrinkResources true
  66. minifyEnabled true
  67. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  68. }
  69. debug {
  70. signingConfig signingConfigs.release
  71. shrinkResources false
  72. minifyEnabled false
  73. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  74. }
  75. }
  76. // 生成的proto文件路径
  77. // sourceSets {
  78. // main {
  79. // proto {
  80. // srcDir 'src/main/java/com/bogo/model/proto'
  81. // }
  82. // }
  83. // }
  84. packagingOptions {
  85. resources {
  86. excludes += ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt']
  87. }
  88. }
  89. compileOptions {
  90. sourceCompatibility = '1.8'
  91. targetCompatibility = '1.8'
  92. }
  93. lint {
  94. abortOnError false
  95. checkReleaseBuilds false
  96. }
  97. buildFeatures {
  98. viewBinding true
  99. }
  100. android.applicationVariants.configureEach { variant ->
  101. variant.outputs.configureEach {
  102. outputFileName = "imchat.apk"
  103. }
  104. }
  105. }
  106. dependencies {
  107. implementation 'androidx.appcompat:appcompat:1.7.0'
  108. implementation 'com.google.android.material:material:1.12.0'
  109. implementation 'androidx.palette:palette:1.0.0'
  110. implementation 'androidx.gridlayout:gridlayout:1.1.0'
  111. implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
  112. implementation 'androidx.recyclerview:recyclerview:1.4.0'
  113. implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
  114. implementation 'androidx.room:room-runtime:2.7.0'
  115. annotationProcessor "androidx.room:room-compiler:2.7.0"
  116. implementation "androidx.camera:camera-camera2:1.4.2"
  117. implementation "androidx.camera:camera-view:1.4.2"
  118. implementation "androidx.camera:camera-extensions:1.4.2"
  119. implementation "androidx.camera:camera-lifecycle:1.4.2"
  120. implementation "androidx.camera:camera-video:1.4.2"
  121. implementation 'androidx.media3:media3-ui:1.6.1'
  122. implementation 'androidx.media3:media3-exoplayer:1.6.1'
  123. implementation "androidx.media3:media3-exoplayer-dash:1.6.1"
  124. implementation 'com.github.bumptech.glide:glide:4.16.0'
  125. implementation "com.github.bumptech.glide:okhttp3-integration:4.16.0"
  126. annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
  127. implementation 'jp.wasabeef:glide-transformations:4.3.0'
  128. implementation 'io.livekit:livekit-android:2.13.0'
  129. implementation 'io.livekit:livekit-android-camerax:2.13.0'
  130. implementation 'com.github.chrisbanes:PhotoView:2.3.0'
  131. implementation 'com.tencent.bugly:crashreport:latest.release'
  132. implementation 'commons-io:commons-io:2.16.1'
  133. implementation 'com.belerweb:pinyin4j:2.5.1'
  134. implementation 'com.squareup.retrofit2:retrofit:2.11.0'
  135. implementation 'com.squareup.retrofit2:converter-gson:2.11.0'
  136. implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11'
  137. implementation 'com.baidu.lbsyun:BaiduMapSDK_Map:7.6.4'
  138. implementation 'com.baidu.lbsyun:BaiduMapSDK_Search:7.6.4'
  139. implementation 'com.baidu.lbsyun:BaiduMapSDK_Util:7.6.4'
  140. implementation 'com.baidu.lbsyun:BaiduMapSDK_Location:9.6.4'
  141. implementation 'com.github.yalantis:ucrop:2.2.8'
  142. implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
  143. implementation 'com.google.protobuf:protobuf-javalite:3.25.4'
  144. implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
  145. }
  146. // 生成的proto文件路径
  147. //protobuf {
  148. // protoc {
  149. // artifact = 'com.google.protobuf:protoc:3.25.4' // ✅ 自动下载 protoc 编译器
  150. // }
  151. // generateProtoTasks {
  152. // all().each { task ->
  153. // task.builtins {
  154. // java {
  155. // option 'lite' // ✅ 生成 javalite 兼容类
  156. // }
  157. // }
  158. // }
  159. // }
  160. //}