build.gradle 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. plugins {
  2. id 'com.android.application'
  3. id 'org.jetbrains.kotlin.android'
  4. id 'kotlin-kapt'
  5. id 'com.google.dagger.hilt.android'
  6. id 'kotlinx-serialization'
  7. }
  8. android {
  9. compileSdk 32
  10. defaultConfig {
  11. applicationId "com.rdiot.yx485"
  12. minSdk 23
  13. targetSdk 32
  14. versionCode 6
  15. versionName "1.1.2"
  16. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  17. }
  18. signingConfigs {
  19. release {
  20. storeFile file('yx485.jks')
  21. storePassword "yx485123456"
  22. keyAlias 'yx485'
  23. keyPassword "yx485123456"
  24. }
  25. }
  26. namespace 'com.rdiot.yx485'
  27. buildTypes {
  28. debug {
  29. signingConfig signingConfigs.release
  30. }
  31. release {
  32. minifyEnabled false
  33. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  34. signingConfig signingConfigs.release
  35. applicationVariants.all { variant ->
  36. variant.outputs.all {
  37. println(variant)
  38. outputFileName = "RD-YX485-${buildType.name}-${defaultConfig.versionName}-${releaseTime()}.apk"
  39. }
  40. }
  41. }
  42. }
  43. compileOptions {
  44. sourceCompatibility JavaVersion.VERSION_1_8
  45. targetCompatibility JavaVersion.VERSION_1_8
  46. }
  47. kotlinOptions {
  48. jvmTarget = '1.8'
  49. }
  50. dataBinding {
  51. enabled true
  52. }
  53. }
  54. dependencies {
  55. implementation 'androidx.core:core-ktx:1.7.0'
  56. implementation 'androidx.appcompat:appcompat:1.5.1'
  57. implementation 'com.google.android.material:material:1.6.1'
  58. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  59. testImplementation 'junit:junit:4.13.2'
  60. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  61. androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
  62. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1"
  63. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
  64. // ViewModel
  65. implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
  66. implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
  67. implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1"
  68. implementation "androidx.activity:activity-ktx:1.5.1"
  69. implementation "androidx.fragment:fragment-ktx:1.3.0"
  70. // Hilt
  71. implementation "com.google.dagger:hilt-android:2.44"
  72. kapt "com.google.dagger:hilt-compiler:2.44"
  73. implementation "androidx.startup:startup-runtime:1.1.1"
  74. // navigation
  75. implementation("androidx.navigation:navigation-fragment-ktx:2.5.3")
  76. implementation("androidx.navigation:navigation-ui-ktx:2.5.3")
  77. // 状态栏 https://github.com/gyf-dev/ImmersionBar
  78. // 基础依赖包,必须要依赖
  79. implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
  80. // kotlin扩展(可选)
  81. implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.2'
  82. // PageView https://github.com/ckrgithub/PageRecyclerView/blob/master/README-ZH.md
  83. implementation project(path: ':pageview')
  84. // 弧形控制 https://github.com/jenly1314/ArcSeekBar
  85. implementation project(path: ':arcseekbar')
  86. // net https://liangjingkanji.github.io/Net/
  87. implementation 'com.squareup.okhttp3:okhttp:4.10.0' // 要求OkHttp4以上
  88. implementation 'com.github.liangjingkanji:Net:3.5.3'
  89. implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2" // JSON序列化库
  90. implementation 'com.google.code.gson:gson:2.9.0' // JSON序列化库, 会导致kotlin默认值无效, 故不推荐
  91. implementation 'com.github.liangjingkanji:Tooltip:1.2.2'
  92. // BRV https://github.com/liangjingkanji/BRV
  93. implementation 'com.github.liangjingkanji:BRV:1.5.8'
  94. implementation 'com.google.android.flexbox:flexbox:3.0.0'// flexbox伸缩(流式)布局
  95. implementation 'com.github.liangjingkanji:Net:3.6.4'
  96. //日志记录器
  97. implementation 'com.localebro:okhttpprofiler:1.0.8'
  98. //Serialize https://github.com/liangjingkanji/Serialize
  99. implementation 'com.github.liangjingkanji:Serialize:1.3.2'
  100. //分段SeekBar https://github.com/Jay-Goo/RangeSeekBar
  101. implementation project(path: ':RangeSeekBar')
  102. //BLE库 https://github.com/Jasonchenlijian/FastBle
  103. implementation project(path: ':FastBleLib')
  104. //Permission X https://github.com/guolindev/PermissionX
  105. implementation 'com.guolindev.permissionx:permissionx:1.7.1'
  106. //LiveEventBus https://github.com/JeremyLiao/LiveEventBus
  107. implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0'
  108. //Dialog https://github.com/lindroy/iOSDialog
  109. implementation 'com.github.lindroy:iOSDialog:1.0.0'
  110. //ZXingLite https://github.com/jenly1314/ZXingLite
  111. implementation 'com.github.jenly1314:zxing-lite:2.2.1'
  112. //Glide https://muyangmin.github.io/glide-docs-cn/
  113. implementation("com.github.bumptech.glide:glide:4.12.0") {
  114. exclude group: "com.android.support"
  115. }
  116. //picker https://github.com/gzu-liyujiang/AndroidPicker
  117. implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:4.1.11'
  118. implementation 'com.github.gzu-liyujiang.AndroidPicker:ImagePicker:4.1.11'
  119. implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:4.1.11'
  120. implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
  121. implementation 'com.github.lzyzsd:jsbridge:1.0.5'
  122. }
  123. // Allow references to generated code
  124. kapt {
  125. correctErrorTypes true
  126. }
  127. static def releaseTime() {
  128. return new Date().format("MM-dd_HHmmss", TimeZone.getTimeZone("Asia/Shanghai"))
  129. }