build.gradle 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-parcelize'
  4. // Add Huawei AGC
  5. apply plugin: 'com.huawei.agconnect'
  6. agcp{
  7. manifest = false
  8. }
  9. android {
  10. compileSdkVersion 34
  11. useLibrary 'org.apache.http.legacy'
  12. sourceSets.main
  13. {
  14. jniLibs.srcDirs = ['libs']
  15. }
  16. dexOptions {
  17. javaMaxHeapSize "4g"
  18. }
  19. defaultConfig {
  20. applicationId "com.sikey.interconnect"
  21. // vectorDrawables.useSupportLibrary = true
  22. minSdkVersion 26
  23. targetSdkVersion 34
  24. versionCode 1
  25. versionName "1.1.28.10"
  26. multiDexEnabled true
  27. }
  28. packagingOptions {
  29. resources {
  30. excludes += ['META-INF/DEPENDENCIES', 'META-INF/NOTICE', 'META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/NOTICE.txt']
  31. }
  32. }
  33. signingConfigs {
  34. debug {
  35. storeFile file("../release_keystore_sikey_kidswatch.jks")
  36. storePassword "sikey2024"
  37. keyAlias "kidswatchrelease"
  38. keyPassword "sikey2024"
  39. }
  40. release {
  41. storeFile file("../release_keystore_sikey_kidswatch.jks")
  42. storePassword "sikey2024"
  43. keyAlias "kidswatchrelease"
  44. keyPassword "sikey2024"
  45. }
  46. }
  47. buildTypes {
  48. debug {
  49. //show log
  50. buildConfigField "boolean", "LOG_DEBUG", "true"
  51. buildConfigField "String", "VIDEO_CALL_VENDOR", "\"agora\""
  52. buildConfigField "boolean", "APP_EXIT_WEBSOCKET_PERSIST", "false"
  53. versionNameSuffix ""
  54. minifyEnabled false
  55. zipAlignEnabled false
  56. shrinkResources false
  57. signingConfig signingConfigs.debug
  58. buildConfigField "String", "APP_ID_AGC", "\"114048095\""
  59. buildConfigField "String", "APP_ID_AGORA", "\"92c4358b9f98419f9a10d345e59a77f1\""
  60. buildConfigField "String", "APP_ID_MCLOUD", "\"1901585318855970816\""
  61. buildConfigField "String", "APP_KEY_MCLOUD", "\"ffc5d87bca2bc65e13c2399219d6b220\""
  62. buildConfigField "String", "SECRET_KEY_MCLOUD", "\"8aad1cdf23be18744dbc0a3eda0b438754fc3486e1fbb74466cc32276c336a10\""
  63. }
  64. release {
  65. signingConfig signingConfigs.release
  66. //do not show log
  67. buildConfigField "boolean", "LOG_DEBUG", "false"
  68. buildConfigField "String", "VIDEO_CALL_VENDOR", "\"agora\""
  69. buildConfigField "boolean", "APP_EXIT_WEBSOCKET_PERSIST", "false"
  70. //zipalign optimize
  71. zipAlignEnabled true
  72. //remove unused resource files
  73. shrinkResources true
  74. minifyEnabled true
  75. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  76. //proguardFiles 'proguard-android.txt','proguard-rules.pro'
  77. buildConfigField "String", "APP_ID_AGC", "\"114048095\""
  78. buildConfigField "String", "APP_ID_AGORA", "\"92c4358b9f98419f9a10d345e59a77f1\""
  79. buildConfigField "String", "APP_ID_MCLOUD", "\"1901585318855970816\""
  80. buildConfigField "String", "APP_KEY_MCLOUD", "\"ffc5d87bca2bc65e13c2399219d6b220\""
  81. buildConfigField "String", "SECRET_KEY_MCLOUD", "\"8aad1cdf23be18744dbc0a3eda0b438754fc3486e1fbb74466cc32276c336a10\""
  82. }
  83. }
  84. /*
  85. productFlavors{
  86. GooglePlay {}
  87. xiaomi {}
  88. umeng {}
  89. _360 {}
  90. baidu {}
  91. _91 {}
  92. wandoujia {}
  93. yingyongbao{}
  94. }
  95. productFlavors.all{
  96. flavor->flavor.manifestPlaceholders=[UMENG_CHANNEL_VALUE: name]
  97. }
  98. applicationVariants.all{ variant->
  99. variant.outputs.each{ output->
  100. def outputFile=output.outputFile
  101. if(outputFile!=null && outputFile.name.endsWith('.apk')){
  102. def fileName=outputFile.name.replace(".apk","-${defaultConfig.versionName}.apk")
  103. output.outputFile=new File(outputFile.parent,fileName)
  104. }
  105. }
  106. }
  107. */
  108. repositories {
  109. flatDir {
  110. // this way we can find the .aar file in libs folder
  111. dirs 'libs'
  112. }
  113. }
  114. compileOptions {
  115. targetCompatibility 17
  116. sourceCompatibility 17
  117. }
  118. kotlinOptions {
  119. jvmTarget = '17'
  120. }
  121. lint {
  122. abortOnError false
  123. disable 'MissingTranslation'
  124. }
  125. namespace 'com.sikey.interconnect'
  126. buildFeatures {
  127. buildConfig true
  128. }
  129. }
  130. dependencies {
  131. implementation 'androidx.multidex:multidex:2.0.1'
  132. implementation fileTree(include: ['*.jar'], dir: 'libs')
  133. implementation(name: 'crop_image', ext: 'aar')
  134. //compile project(':social_sdk_library_project')
  135. // implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  136. implementation 'com.google.android.material:material:1.9.0'
  137. //kotlin coroutines
  138. implementation(platform('org.jetbrains.kotlin:kotlin-bom:1.8.0'))
  139. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1"
  140. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1"
  141. // androidX
  142. implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
  143. implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
  144. implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
  145. implementation 'androidx.appcompat:appcompat:1.6.1'
  146. implementation 'androidx.activity:activity-ktx:1.7.0'
  147. implementation 'androidx.fragment:fragment-ktx:1.5.6'
  148. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  149. implementation 'androidx.recyclerview:recyclerview:1.3.0'
  150. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  151. implementation 'androidx.cardview:cardview:1.0.0'
  152. implementation 'androidx.transition:transition:1.4.1'
  153. implementation 'androidx.exifinterface:exifinterface:1.3.6'
  154. implementation 'com.airbnb.android:lottie:3.0.0'
  155. implementation 'com.ashokvarma.android:bottom-navigation-bar:1.3.1'
  156. implementation 'com.lcodecorex:tkrefreshlayout:1.0.5'
  157. //zxing核心依赖
  158. implementation 'com.google.zxing:core:3.5.0'
  159. implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
  160. implementation 'com.koushikdutta.async:androidasync:2.2.1'
  161. // GMS
  162. // implementation 'com.google.android.gms:play-services-maps:18.1.0'
  163. implementation 'com.google.android.libraries.places:places:3.0.0'
  164. // implementation 'com.google.android.gms:play-services-location:21.0.1'
  165. // implementation 'com.google.android.gms:play-services-auth:20.4.1'
  166. // implementation 'com.google.android.gms:play-services-basement:18.2.0'
  167. implementation 'com.github.pengrad:mapscaleview:1.2.1'
  168. // implementation 'com.google.firebase:firebase-messaging:23.4.0'
  169. // implementation 'com.google.firebase:firebase-messaging-ktx:23.4.0'
  170. // implementation 'com.google.firebase:firebase-core:21.1.1'
  171. // implementation(platform("com.google.firebase:firebase-bom:32.7.1"))
  172. //rxpremissions
  173. implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
  174. implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
  175. implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'
  176. //retrofit
  177. implementation 'com.squareup.retrofit2:retrofit:2.9.0'
  178. implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
  179. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
  180. implementation 'com.squareup.retrofit2:retrofit-converters:2.5.0'
  181. implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.10'
  182. implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
  183. implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
  184. //gson
  185. implementation 'com.google.code.gson:gson:2.10'
  186. implementation 'org.greenrobot:eventbus:3.1.0-RC'
  187. implementation 'com.github.yalantis:ucrop:2.2.8'
  188. // MiPush
  189. implementation (name: 'MiPush_SDK_Client_6_0_1-C_3rd', ext: 'aar')
  190. // VPush
  191. implementation (name: 'vpush_clientSDK_v4.0.6.0_506', ext: 'aar')
  192. // Add Huawei AGC
  193. implementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
  194. implementation 'com.huawei.hms:push:6.12.0.300'
  195. // Oppo Push
  196. implementation (name: 'com.heytap.msp_V3.7.1', ext: 'aar')
  197. implementation 'commons-codec:commons-codec:1.6'
  198. implementation 'androidx.annotation:annotation:1.1.0'
  199. // 声网视频通话
  200. //implementation "io.agora.rtc:full-sdk:4.5.2"
  201. implementation 'com.github.bumptech.glide:glide:4.16.0'
  202. implementation 'com.arthenica:mobile-ffmpeg-audio:4.4'
  203. // Baidu Map
  204. implementation (name: 'BaiduLBS_Android_V7.6.5', ext: 'aar')
  205. }