build.gradle 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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","arm64-v8a"
  21. abiFilters "arm64-v8a"
  22. }
  23. }
  24. signingConfigs {
  25. debug {
  26. storeFile file('./src/main/jks/hh-face.jks')
  27. storePassword 'Nqj##117521'
  28. keyAlias 'hemile'
  29. keyPassword 'Nqj##117521'
  30. }
  31. release {
  32. storeFile file('./src/main/jks/hh-face.jks')
  33. storePassword 'Nqj##117521'
  34. keyAlias 'hemile'
  35. keyPassword 'Nqj##117521'
  36. }
  37. }
  38. buildTypes {
  39. // 因为支付宝刷脸需要包名一致,所以以后仅使用release版本,不再使用debug版本
  40. release {
  41. // 服务器地址
  42. // 正式
  43. buildConfigField("String", "BASE_URL", "\"https://noise.hz-hanghui.com:8088/yx-fyzd/\"")
  44. // 测试
  45. // buildConfigField("String", "BASE_URL", "\"https://test.hz-hanghui.com:18890/zhejiang-fyzd/\"")
  46. buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"")
  47. buildConfigField("String", "BASE_URL_OMC", "\"https://hhomc.hz-hanghui.com:8096/\"")
  48. // aidl服务端包名
  49. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc\"")
  50. resValue "string", "app_name", "GRBJ"
  51. signingConfig signingConfigs.release
  52. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  53. shrinkResources false
  54. minifyEnabled false
  55. zipAlignEnabled true
  56. debuggable true
  57. jniDebuggable true
  58. testCoverageEnabled false
  59. // 3.0后的配置
  60. applicationVariants.all { variant ->
  61. variant.outputs.all { output ->
  62. def outputFile = output.outputFile
  63. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  64. // 输出apk名称为jjb_v1.0_wandoujia.apk
  65. def fileName_new = "hh_baidu_face_v${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk"
  66. outputFileName = fileName_new
  67. }
  68. }
  69. }
  70. }
  71. yufabu {
  72. applicationIdSuffix ".yufabu"
  73. buildConfigField("String", "BASE_URL", "\"http://192.168.11.87:8081/\"")
  74. buildConfigField("String", "BASE_API_URL", "\"hanghui/outapi/\"")
  75. buildConfigField("String", "BASE_URL_OMC", "\"http://192.168.11.9:9086/\"")
  76. // aidl服务端包名
  77. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc.yufabu\"")
  78. // 测试的IM信息
  79. // buildConfigField("int", "TIM_SDKAPPID", "1400803088")
  80. // buildConfigField("String", "TIM_SECRETKEY", "\"f942e1545dd5465c6d54fe68d2c42d9af424a2e7f3ed84133bc2f7b40191b271\"")
  81. resValue "string", "app_name", "测试HHArome"
  82. minifyEnabled false
  83. shrinkResources false
  84. jniDebuggable true
  85. debuggable true
  86. signingConfig signingConfigs.release
  87. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  88. }
  89. debug {
  90. applicationIdSuffix ".test"
  91. // buildConfigField("String", "BASE_URL", "\"https://tx.hz-hanghui.com:8088/\"")
  92. // buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"")
  93. //
  94. // buildConfigField("String", "BASE_URL_OMC", "\"https://hhomc.hz-hanghui.com:8096/\"")
  95. buildConfigField("String", "BASE_URL", "\"https://test.hz-hanghui.com:18890/\"")
  96. buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"")
  97. // buildConfigField("String", "BASE_URL", "\"http://192.168.11.17:8081/\"")
  98. // buildConfigField("String", "BASE_API_URL", "\"hanghui/outapi/\"")
  99. buildConfigField("String", "BASE_URL_OMC", "\"http://192.168.11.9:9086/\"")
  100. // aidl服务端包名
  101. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc.test\"")
  102. resValue "string", "app_name", "开发HHArome"
  103. signingConfig signingConfigs.release
  104. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  105. shrinkResources false
  106. minifyEnabled false
  107. zipAlignEnabled true
  108. debuggable true
  109. jniDebuggable true
  110. testCoverageEnabled false
  111. }
  112. }
  113. // 与buildTypes中输出签名后的apk对应
  114. productFlavors {
  115. app {}
  116. }
  117. productFlavors.all {
  118. flavor -> flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
  119. }
  120. dexOptions {
  121. javaMaxHeapSize "4g"
  122. }
  123. repositories {
  124. flatDir {
  125. dirs 'libs'
  126. }
  127. }
  128. sourceSets {
  129. main {
  130. jniLibs.srcDirs = ['libs']
  131. }
  132. }
  133. compileOptions {
  134. sourceCompatibility JavaVersion.VERSION_1_8
  135. targetCompatibility JavaVersion.VERSION_1_8
  136. }
  137. ndkVersion '21.0.6113669'
  138. // 去除重复的so
  139. packagingOptions {
  140. // pickFirsts:当出现重复文件,会使用第一个匹配的文件打包进入apk
  141. pickFirst 'lib/armeabi-v7a/libandroid_serial_port.so'
  142. pickFirst 'lib/armeabi-v7a/libserial_port.so'
  143. pickFirst 'lib/armeabi/libserial_port.so'
  144. pickFirst 'lib/arm64-v8a/libc++_shared.so'
  145. pickFirst 'lib/armeabi-v7a/libc++_shared.so'
  146. }
  147. }
  148. dependencies {
  149. implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
  150. implementation 'androidx.appcompat:appcompat:1.1.0'
  151. implementation 'com.google.android.material:material:1.1.0'
  152. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  153. implementation project(path: ':SeriaApp')
  154. testImplementation 'junit:junit:4.+'
  155. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  156. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  157. implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.72"
  158. // 添加base依赖
  159. implementation project(path: ':lib_base')
  160. // usb串口通信
  161. implementation 'com.github.felHR85:UsbSerial:4.5.2'
  162. // 百度刷脸---begin
  163. implementation project(path: ':datalibrary')
  164. implementation project(path: ':facelibrary')
  165. implementation project(path: ':gatelibrary')
  166. implementation project(path: ':identifylibrary')
  167. implementation project(path: ':registerlibrary')
  168. implementation project(path: ':settinglibrary')
  169. implementation project(path: ':lib_baidu_face')
  170. // 百度刷脸--end
  171. implementation 'com.neovisionaries:nv-websocket-client:2.6'
  172. implementation 'org.java-websocket:Java-WebSocket:1.3.7'
  173. // implementation 'com.github.centerzx:ShapeBlurView:1.0.5'
  174. // implementation project(path: ':blurview')
  175. // 高斯模糊
  176. // implementation 'jp.wasabeef:glide-transformations:4.3.0'
  177. // 天波
  178. // implementation files('libs/posutil_sdk_20231016.jar')
  179. implementation files('libs/posutil_sdk_20231226.jar')
  180. }