build.gradle 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. apply plugin: 'com.android.application'
  2. //获取local.properties的内容
  3. Properties properties = new Properties()
  4. properties.load(project.rootProject.file('local.properties').newDataInputStream())
  5. //打包时间
  6. def releaseTime() {
  7. return new Date().format("yyyy-MM-dd-HH-mm-ss")
  8. }
  9. android {
  10. compileSdkVersion 31
  11. buildToolsVersion "29.0.3"
  12. defaultConfig {
  13. applicationId "com.syjk.watch.dealer"
  14. minSdkVersion 23
  15. targetSdkVersion 31
  16. versionCode 1
  17. versionName rootProject.ext.versions['watch-sdk-version']
  18. flavorDimensions ""
  19. ndk {
  20. // 设置支持的SO库架构
  21. abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'//, 'armeabi','x86', 'x86_64'
  22. }
  23. javaCompileOptions {
  24. annotationProcessorOptions {
  25. arguments = [AROUTER_MODULE_NAME: project.getName()]
  26. }
  27. }
  28. multiDexEnabled true
  29. }
  30. buildTypes {
  31. release {
  32. minifyEnabled false
  33. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  34. }
  35. }
  36. //动态打包
  37. signingConfigs {
  38. config {
  39. storeFile file(properties.getProperty("keystroe_storeFile"))
  40. storePassword properties.getProperty("keystroe_storePassword")
  41. keyAlias properties.getProperty("keystroe_keyAlias")
  42. keyPassword properties.getProperty("keystroe_keyPassword")
  43. }
  44. }
  45. productFlavors {
  46. syjk_dev {
  47. // 每个环境包名不同
  48. applicationId "com.syjk.watch.dealer"
  49. versionCode rootProject.ext.versions['version-code']
  50. versionName rootProject.ext.versions['watch-sdk-version']//版本和sdk版本保持一致
  51. // 动态添加 string.xml 字段;
  52. // 注意,这里是添加,在 string.xml 不能有这个字段,会重名!!!
  53. resValue "string", "app_name", "苏药健康-开发版"
  54. // 动态修改 常量 字段
  55. buildConfigField "String", "API_HOST", '"http://njmb-gk.hiseemedical.com"'
  56. //管控api已替换
  57. buildConfigField "String", "BUGLY_APPID", '"ccd8eb91cb"'//已替换
  58. buildConfigField "String", "LOG_TAG", '"hopital_online_wdrm_dev"'//已替换
  59. }
  60. syjk {
  61. // 每个环境包名不同
  62. applicationId "com.syjk.watch.dealer"
  63. versionCode rootProject.ext.versions['version-code']
  64. versionName rootProject.ext.versions['watch-sdk-version']//版本和sdk版本保持一致
  65. // 动态添加 string.xml 字段;
  66. // 注意,这里是添加,在 string.xml 不能有这个字段,会重名!!!
  67. resValue "string", "app_name", "苏药健康"
  68. // 动态修改 常量 字段
  69. // buildConfigField "String", "API_HOST", '"http://njmb-gk.hiseemedical.com"'// 测试环境
  70. buildConfigField "String", "API_HOST", '"https://business.tianyiyun-nj.com"'// 正式环境
  71. //管控api已替换
  72. buildConfigField "String", "BUGLY_APPID", '"ccd8eb91cb"'//已替换
  73. buildConfigField "String", "LOG_TAG", '"hopital_online_wdrm_dev"'//已替换
  74. }
  75. }
  76. buildTypes {
  77. release {
  78. // 开启混淆
  79. minifyEnabled false
  80. // 开启ZipAlign优化
  81. zipAlignEnabled true
  82. //资源压缩
  83. shrinkResources false
  84. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  85. // 批量打包
  86. applicationVariants.all { variant ->
  87. variant.outputs.all {
  88. outputFileName = "${releaseTime()}.apk"
  89. }
  90. }
  91. }
  92. debug {
  93. // minifyEnabled true
  94. // // 开启ZipAlign优化
  95. // zipAlignEnabled true
  96. // //资源压缩
  97. // shrinkResources true
  98. // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  99. signingConfig signingConfigs.config
  100. }
  101. }
  102. compileOptions {
  103. sourceCompatibility = 1.8
  104. targetCompatibility = 1.8
  105. }
  106. sourceSets {
  107. main {
  108. jniLibs.srcDirs = ['libs']
  109. }
  110. }
  111. }
  112. //使用aar时必须要设置的
  113. repositories {
  114. flatDir {
  115. dirs 'libs'
  116. }
  117. }
  118. dependencies {
  119. implementation fileTree(dir: "libs", include: ["*.jar"])
  120. implementation 'androidx.appcompat:appcompat:1.1.0'
  121. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  122. implementation(name: 'industry-service', ext: 'aar')
  123. implementation(name: 'industry-connectionui', ext: 'aar')
  124. implementation(name: 'industry-client', ext: 'aar')
  125. implementation 'org.bouncycastle:bcprov-jdk15to18:1.70'
  126. implementation 'net.zetetic:android-database-sqlcipher:4.5.1'
  127. // implementation 'com.google.code.gson:gson:2.9.0'
  128. // implementation 'com.mikesamuel:json-sanitizer:1.2.2'
  129. implementation 'commons-io:commons-io:2.11.0'
  130. implementation 'com.huawei.hms:network-grs:6.0.11.300'
  131. implementation 'com.huawei.android.hms:security-encrypt:1.2.0.307'
  132. implementation 'com.huawei.android.hms:security-ssl:1.2.0.306'
  133. implementation(name: 'libble-0.5', ext: 'aar')
  134. implementation(name: 'libdfu-1.5', ext: 'aar')
  135. implementation(name: 'libfastdfu-0.5', ext: 'aar')
  136. implementation(name: 'vpprotocol-2.2.47.15', ext: 'aar')
  137. // 日志
  138. implementation 'com.orhanobut:logger:2.2.0'
  139. // 路由
  140. implementation 'com.alibaba:arouter-api:1.5.2'
  141. implementation files('libs/vpbluetooth_1.0.4.jar')
  142. implementation files('libs/libcomx-0.5.jar')
  143. annotationProcessor "com.alibaba:arouter-compiler:1.5.2"
  144. // 事件
  145. implementation 'org.greenrobot:eventbus:3.1.1'
  146. // 屏幕适配
  147. implementation 'me.jessyan:autosize:1.2.1'
  148. // RxJava
  149. implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
  150. implementation 'io.reactivex.rxjava3:rxjava:3.1.5'
  151. // RxLife
  152. implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
  153. implementation 'com.trello.rxlifecycle4:rxlifecycle-components:4.0.2'
  154. implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2'
  155. //Rxbinding
  156. implementation 'com.jakewharton.rxbinding4:rxbinding-material:4.0.0'
  157. // 状态栏
  158. implementation 'com.jaeger.statusbarutil:library:1.5.1'
  159. // 腾讯x5浏览器
  160. implementation 'com.tencent.tbs.tbssdk:sdk:43939'
  161. // network
  162. implementation 'com.squareup.okhttp3:okhttp:3.10.0'
  163. implementation 'com.squareup.retrofit2:retrofit:2.9.0'
  164. implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
  165. implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
  166. implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
  167. implementation 'com.github.ihsanbal:LoggingInterceptor:3.0.0'
  168. //万能Recycler适配器
  169. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50'
  170. //Recycler刷新控件
  171. implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'
  172. // glide
  173. implementation 'com.github.bumptech.glide:glide:4.8.0'
  174. annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
  175. implementation 'jp.wasabeef:glide-transformations:4.0.1'
  176. // orm
  177. implementation 'com.github.satyan:sugar:1.5'
  178. implementation 'com.jakewharton:butterknife:10.2.3'
  179. annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
  180. implementation 'com.rengwuxian.materialedittext:library:2.1.4'
  181. implementation 'com.tencent.bugly:crashreport:3.4.4'
  182. // 权限管理
  183. implementation 'com.qw:soulpermission:1.2.2'
  184. ///导航栏
  185. implementation 'com.github.hackware1993:magicindicator:1.5.0'
  186. //统计图
  187. implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
  188. implementation 'com.pnikosis:materialish-progress:1.7'
  189. implementation 'com.github.lihangleo2:ShadowLayout:3.2.4'
  190. implementation 'com.google.android:flexbox:1.0.0'
  191. implementation 'com.tencent.mm.opensdk:wechat-sdk-android:+'
  192. implementation 'com.github.mcxtzhang:SwipeDelMenuLayout:V1.3.0'
  193. implementation 'com.xw.repo:bubbleseekbar:3.20-lite'
  194. implementation 'com.github.youlookwhat:WebProgress:1.1.0'
  195. }