build.gradle 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. }
  21. }
  22. signingConfigs {
  23. debug {
  24. storeFile file('./src/main/jks/hh-face.jks')
  25. storePassword 'Nqj##117521'
  26. keyAlias 'hemile'
  27. keyPassword 'Nqj##117521'
  28. }
  29. release {
  30. storeFile file('./src/main/jks/hh-face.jks')
  31. storePassword 'Nqj##117521'
  32. keyAlias 'hemile'
  33. keyPassword 'Nqj##117521'
  34. }
  35. }
  36. buildTypes {
  37. release {
  38. // 服务器地址
  39. buildConfigField("String", "BASE_URL", "\"https://tx.hz-hanghui.com:8088/\"")
  40. buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"")
  41. buildConfigField("String", "BASE_URL_OMC", "\"https://hhomc.hz-hanghui.com:8096/\"")
  42. // aidl服务端包名
  43. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc\"")
  44. resValue "string", "app_name", "HHArome"
  45. signingConfig signingConfigs.release
  46. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  47. shrinkResources false
  48. minifyEnabled false
  49. zipAlignEnabled true
  50. debuggable true
  51. jniDebuggable true
  52. testCoverageEnabled false
  53. // 3.0后的配置
  54. applicationVariants.all { variant ->
  55. variant.outputs.all { output ->
  56. def outputFile = output.outputFile
  57. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  58. // 输出apk名称为jjb_v1.0_wandoujia.apk
  59. def fileName_new = "hharome_v${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk"
  60. outputFileName = fileName_new
  61. }
  62. }
  63. }
  64. }
  65. yufabu {
  66. applicationIdSuffix ".yufabu"
  67. buildConfigField("String", "BASE_URL", "\"http://192.168.11.87:8081/\"")
  68. buildConfigField("String", "BASE_API_URL", "\"hanghui/outapi/\"")
  69. buildConfigField("String", "BASE_URL_OMC", "\"http://192.168.11.9:9086/\"")
  70. // aidl服务端包名
  71. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc.yufabu\"")
  72. // 测试的IM信息
  73. // buildConfigField("int", "TIM_SDKAPPID", "1400803088")
  74. // buildConfigField("String", "TIM_SECRETKEY", "\"f942e1545dd5465c6d54fe68d2c42d9af424a2e7f3ed84133bc2f7b40191b271\"")
  75. resValue "string", "app_name", "测试HHArome"
  76. minifyEnabled false
  77. shrinkResources false
  78. jniDebuggable true
  79. debuggable true
  80. signingConfig signingConfigs.release
  81. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  82. }
  83. debug {
  84. applicationIdSuffix ".test"
  85. buildConfigField("String", "BASE_URL", "\"http://192.168.11.17:8081/\"")
  86. buildConfigField("String", "BASE_API_URL", "\"hanghui/outapi/\"")
  87. buildConfigField("String", "BASE_URL_OMC", "\"http://192.168.11.9:9086/\"")
  88. // aidl服务端包名
  89. buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc.test\"")
  90. resValue "string", "app_name", "开发HHArome"
  91. minifyEnabled false
  92. shrinkResources false
  93. jniDebuggable true
  94. debuggable true
  95. signingConfig signingConfigs.release
  96. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  97. }
  98. }
  99. // 与buildTypes中输出签名后的apk对应
  100. productFlavors {
  101. app {}
  102. }
  103. productFlavors.all {
  104. flavor -> flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
  105. }
  106. dexOptions {
  107. javaMaxHeapSize "4g"
  108. }
  109. repositories {
  110. flatDir {
  111. dirs 'libs'
  112. }
  113. }
  114. sourceSets {
  115. main {
  116. jniLibs.srcDirs = ['libs']
  117. }
  118. }
  119. compileOptions {
  120. sourceCompatibility JavaVersion.VERSION_1_8
  121. targetCompatibility JavaVersion.VERSION_1_8
  122. }
  123. ndkVersion '21.0.6113669'
  124. }
  125. dependencies {
  126. implementation 'androidx.appcompat:appcompat:1.1.0'
  127. implementation 'com.google.android.material:material:1.1.0'
  128. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  129. // implementation files('libs\\telpo_sdk_210726.jar')
  130. testImplementation 'junit:junit:4.+'
  131. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  132. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  133. // 添加base依赖
  134. implementation project(path: ':lib_base')
  135. implementation project(path: ':lib_print')
  136. // 微信xlog日志
  137. implementation 'com.elvishew:xlog:1.10.1'
  138. // 支付宝刷脸
  139. implementation(name: 'ABCP-API-5.5.2.4-lite', ext: 'aar')
  140. // 在线身份证
  141. implementation files('libs/IDOCR.PubSdk.Android.Std.NFC.Release-11.0.4.jar')
  142. //
  143. implementation files('libs/PosUtil.jar')
  144. // 天波-D2
  145. // implementation files('libs/telpo_sdk_210726.jar'){
  146. //// exclude module: 'com.github.maybesix:Android-XHLibrary'
  147. // }
  148. // AMPE
  149. implementation(name: 'aromecli-build-1.0.0.230918203554', ext: 'aar')
  150. implementation 'com.alibaba:fastjson:1.2.76'
  151. //串口
  152. implementation 'com.github.licheedev:Android-SerialPort-API:2.0.0'
  153. //二维码串口
  154. implementation 'com.aill:AndroidSerialPort:1.0.8'
  155. // 串口通信
  156. implementation 'com.github.felHR85:UsbSerial:4.5.2'
  157. implementation project(':SeriaApp')
  158. //串口
  159. // implementation 'com.github.maybesix:Android-XHLibrary:v1.0.0'
  160. implementation 'com.jakewharton:butterknife:7.0.0'
  161. //国密ma4加解密及签名
  162. implementation 'com.blankj:utilcodex:1.31.1'
  163. implementation 'cn.hutool:hutool-all:5.4.5'
  164. implementation 'org.bouncycastle:bcprov-jdk15to18:1.69'
  165. implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.72"
  166. // implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.32"
  167. }
  168. repositories {
  169. mavenCentral()
  170. }