build.gradle 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. id 'kotlin-android-extensions'
  5. }
  6. android {
  7. compileSdkVersion rootProject.ext.android["compileSdkVersion"]
  8. buildToolsVersion rootProject.ext.android["buildToolsVersion"]
  9. defaultConfig {
  10. applicationId rootProject.ext.android["applicationId"]
  11. minSdkVersion rootProject.ext.android["minSdkVersion"]
  12. targetSdkVersion rootProject.ext.android["targetSdkVersion"]
  13. versionCode rootProject.ext.android["versionCode"]
  14. versionName rootProject.ext.android["versionName"]
  15. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  16. consumerProguardFiles 'consumer-rules.pro'
  17. flavorDimensions "versionCode"
  18. ndk {
  19. abiFilters "armeabi-v7a","armeabi"
  20. // abiFilters "armeabi-v7a"
  21. }
  22. }
  23. signingConfigs {
  24. debug {
  25. storeFile file('./src/main/jks/hh-face.jks')
  26. storePassword 'Nqj##117521'
  27. keyAlias 'hemile'
  28. keyPassword 'Nqj##117521'
  29. }
  30. release {
  31. storeFile file('./src/main/jks/hh-face.jks')
  32. storePassword 'Nqj##117521'
  33. keyAlias 'hemile'
  34. keyPassword 'Nqj##117521'
  35. }
  36. }
  37. buildTypes {
  38. // 因为支付宝刷脸需要包名一致,所以以后仅使用release版本,不再使用debug版本
  39. release {
  40. // 服务器地址
  41. // 正式
  42. buildConfigField("String", "BASE_URL", "\"https://tx.hz-hanghui.com:8088/\"")
  43. // 测试
  44. // buildConfigField("String", "BASE_URL", "\"https://test.hz-hanghui.com:18890/\"")
  45. buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"")
  46. buildConfigField("String", "BASE_URL_OMC", "\"https://hhomc.hz-hanghui.com:8096/\"")
  47. // aidl服务端包名
  48. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc\"")
  49. resValue "string", "app_name", "HHArome"
  50. signingConfig signingConfigs.release
  51. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  52. shrinkResources false
  53. minifyEnabled false
  54. zipAlignEnabled true
  55. debuggable true
  56. jniDebuggable true
  57. testCoverageEnabled false
  58. // 3.0后的配置
  59. applicationVariants.all { variant ->
  60. variant.outputs.all { output ->
  61. def outputFile = output.outputFile
  62. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  63. // 输出apk名称为jjb_v1.0_wandoujia.apk
  64. def fileName_new = "hharome_v${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk"
  65. outputFileName = fileName_new
  66. }
  67. }
  68. }
  69. }
  70. yufabu {
  71. applicationIdSuffix ".yufabu"
  72. buildConfigField("String", "BASE_URL", "\"http://192.168.11.87:8081/\"")
  73. buildConfigField("String", "BASE_API_URL", "\"hanghui/outapi/\"")
  74. buildConfigField("String", "BASE_URL_OMC", "\"http://192.168.11.9:9086/\"")
  75. // aidl服务端包名
  76. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc.yufabu\"")
  77. // 测试的IM信息
  78. // buildConfigField("int", "TIM_SDKAPPID", "1400803088")
  79. // buildConfigField("String", "TIM_SECRETKEY", "\"f942e1545dd5465c6d54fe68d2c42d9af424a2e7f3ed84133bc2f7b40191b271\"")
  80. resValue "string", "app_name", "测试HHArome"
  81. minifyEnabled false
  82. shrinkResources false
  83. jniDebuggable true
  84. debuggable true
  85. signingConfig signingConfigs.release
  86. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  87. }
  88. debug {
  89. applicationIdSuffix ".test"
  90. // buildConfigField("String", "BASE_URL", "\"https://tx.hz-hanghui.com:8088/\"")
  91. // buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"")
  92. //
  93. // buildConfigField("String", "BASE_URL_OMC", "\"https://hhomc.hz-hanghui.com:8096/\"")
  94. buildConfigField("String", "BASE_URL", "\"https://test.hz-hanghui.com:18890/\"")
  95. buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"")
  96. // buildConfigField("String", "BASE_URL", "\"http://192.168.11.17:8081/\"")
  97. // buildConfigField("String", "BASE_API_URL", "\"hanghui/outapi/\"")
  98. buildConfigField("String", "BASE_URL_OMC", "\"http://192.168.11.9:9086/\"")
  99. // aidl服务端包名
  100. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc.test\"")
  101. resValue "string", "app_name", "开发HHArome"
  102. signingConfig signingConfigs.release
  103. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  104. shrinkResources false
  105. minifyEnabled false
  106. zipAlignEnabled true
  107. debuggable true
  108. jniDebuggable true
  109. testCoverageEnabled false
  110. }
  111. }
  112. // 与buildTypes中输出签名后的apk对应
  113. productFlavors {
  114. app {}
  115. }
  116. productFlavors.all {
  117. flavor -> flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
  118. }
  119. dexOptions {
  120. javaMaxHeapSize "4g"
  121. }
  122. repositories {
  123. flatDir {
  124. dirs 'libs'
  125. }
  126. }
  127. sourceSets {
  128. main {
  129. jniLibs.srcDirs = ['libs']
  130. }
  131. }
  132. compileOptions {
  133. sourceCompatibility JavaVersion.VERSION_1_8
  134. targetCompatibility JavaVersion.VERSION_1_8
  135. }
  136. ndkVersion '21.0.6113669'
  137. // 去除重复的so
  138. packagingOptions {
  139. // pickFirsts:当出现重复文件,会使用第一个匹配的文件打包进入apk
  140. pickFirst 'lib/armeabi-v7a/libandroid_serial_port.so'
  141. pickFirst 'lib/armeabi-v7a/libserial_port.so'
  142. pickFirst 'lib/armeabi/libserial_port.so'
  143. }
  144. }
  145. dependencies {
  146. implementation 'androidx.appcompat:appcompat:1.1.0'
  147. implementation 'com.google.android.material:material:1.1.0'
  148. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  149. implementation files('libs\\RocoApiManager.jar')
  150. // implementation files('libs\\telpo_sdk_210726.jar')
  151. testImplementation 'junit:junit:4.+'
  152. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  153. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  154. // implementation files('libs/SerialPort.jar')
  155. // 添加base依赖
  156. implementation project(path: ':lib_base')
  157. // implementation project(path: ':lib_print')
  158. // 打印
  159. implementation(name: 'printlib-debug', ext: 'aar')
  160. implementation project(path: ':lib_print')
  161. // USB二维码
  162. implementation project(path: ':lib_usb_qr')
  163. // 身份证
  164. // implementation project(path: ':lib_idcard')
  165. // 微信xlog日志
  166. implementation 'com.elvishew:xlog:1.10.1'
  167. // 百度语音
  168. implementation files('libs/com.baidu.tts_2.3.0.jar')
  169. // 支付宝刷脸
  170. implementation(name: 'ABCP-API-5.5.2.4-lite', ext: 'aar')
  171. // 金联汇通-在线身份证-nfc
  172. implementation(name: 'IDOCR.PubSdk.Android.Std.Device.Tcp.NFC.Release-11.0.9', ext: 'aar')
  173. // implementation files('libs/IDOCR.PubSdk.Android.Std.NFC.Release-11.0.4.jar')
  174. // 金联汇通-在线身份证-usb
  175. implementation files('libs/IDOCR.PubSdk.Android.SerialPort.Release-1.0.4.jar')
  176. // 关机
  177. // implementation files('libs/PosUtil.jar')
  178. // 马里奥y9——硬件所需
  179. implementation files('libs/OrbbecSSDK_1.0.0.3_0f2b082_240327.jar')
  180. // 天波-D2补光灯
  181. implementation files('libs/posutil_sdk_20231226.jar')
  182. // 天波-D2
  183. // implementation files('libs/telpo_sdk_210726.jar'){
  184. //// exclude module: 'com.github.maybesix:Android-XHLibrary'
  185. // }
  186. // AMPE
  187. implementation(name: 'aromecli-build-1.0.0.230918203554', ext: 'aar')
  188. // 新中新
  189. implementation project(':idCard')
  190. implementation project(path: ':MultiReaderLib')
  191. implementation 'com.alibaba:fastjson:1.2.76'
  192. //串口
  193. implementation 'com.github.licheedev:Android-SerialPort-API:2.0.0'
  194. //二维码串口
  195. implementation 'com.aill:AndroidSerialPort:1.0.8'
  196. // 串口通信
  197. implementation 'com.github.felHR85:UsbSerial:4.5.2'
  198. implementation project(':SeriaApp')
  199. //串口
  200. // implementation 'com.github.maybesix:Android-XHLibrary:v1.0.0'
  201. implementation 'com.jakewharton:butterknife:7.0.0'
  202. //国密ma4加解密及签名
  203. implementation 'com.blankj:utilcodex:1.31.1'
  204. implementation 'cn.hutool:hutool-all:5.4.5'
  205. implementation 'org.bouncycastle:bcprov-jdk15to18:1.69'
  206. implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.72"
  207. // implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.32"
  208. // pcm转mp3
  209. // implementation 'com.github.oshiro-pp:lamejni:1.0.1'
  210. // implementation 'com.github.mik3y:lame4android:1.0.10'
  211. // 录音
  212. // implementation 'com.github.zhaolewei:ZlwAudioRecorder:v1.07'
  213. implementation project(':recorderlib')
  214. // implementation 'com.mpatric:mp3agic:0.9.1'
  215. // bugly
  216. implementation 'com.tencent.bugly:crashreport:4.0.4'
  217. //GT基础功能(必要的)
  218. // implementation 'com.github.1079374315:GSLS_Tool:v1.4.5.2'
  219. //副屏库
  220. implementation project(':secondaryscreen')
  221. implementation project(':lib_basecard')
  222. implementation project(':lib_sscard')
  223. implementation project(':lib_nfc')
  224. }
  225. repositories {
  226. mavenCentral()
  227. }