build.gradle 5.3 KB

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