android小炒设备
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

217 lines
7.4 KiB

  1. import java.text.DateFormat
  2. import java.text.SimpleDateFormat
  3. apply plugin: 'com.android.application'
  4. //apply plugin: 'com.jakewharton.butterknife'
  5. def releaseTime() {
  6. DateFormat df = new SimpleDateFormat("yyyyMMddHHmm")
  7. return df.format(Calendar.getInstance(Locale.CHINA).getTime())
  8. }
  9. android {
  10. compileSdk rootProject.ext.compileSdkVersion
  11. defaultConfig {
  12. applicationId rootProject.ext.applicationId
  13. minSdk rootProject.ext.minSdkVersion
  14. targetSdk rootProject.ext.targetSdkVersion
  15. versionCode rootProject.ext.versionCode
  16. versionName rootProject.ext.versionName
  17. manifestPlaceholders = [UMENG_CHANNEL_VALUE : "default"]
  18. testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
  19. multiDexEnabled true
  20. }
  21. signingConfigs {
  22. release {
  23. storeFile file('D:/AndroidStudioGit/shanghai/keystore.jks')
  24. storePassword "123456"
  25. keyAlias "hbl"
  26. keyPassword "123456"
  27. }
  28. }
  29. buildTypes {
  30. release {
  31. minifyEnabled false
  32. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  33. resValue("bool","superAdminTest","false")
  34. }
  35. debug {
  36. resValue("string", "PORT_NUMBER", "8081")
  37. resValue("bool","superAdminTest","true")
  38. }
  39. }
  40. lintOptions {
  41. abortOnError false
  42. checkReleaseBuilds false
  43. }
  44. compileOptions {
  45. coreLibraryDesugaringEnabled true
  46. sourceCompatibility JavaVersion.VERSION_1_8
  47. targetCompatibility JavaVersion.VERSION_1_8
  48. }
  49. buildToolsVersion rootProject.ext.buildToolsVersion
  50. sourceSets {
  51. main {
  52. res.srcDirs = [
  53. 'src/main/res/layout/dialog',
  54. 'src/main/res/layout/datatab',
  55. 'src/main/res/layout/item',
  56. 'src/main/res/layout/new',
  57. 'src/main/res/layout',
  58. 'src/main/res'
  59. ]
  60. assets {
  61. srcDirs 'src\\main\\assets'
  62. }
  63. }
  64. }
  65. buildFeatures {
  66. viewBinding = true
  67. }
  68. applicationVariants.all { variant ->
  69. variant.outputs.all {
  70. outputFileName = "robot-xiaochao-v${defaultConfig.versionCode}-${releaseTime()}"+"-unsigned-${variant.name}.apk"
  71. }
  72. }
  73. }
  74. dependencies {
  75. implementation fileTree(include: ['*.jar'], dir: 'libs')
  76. //测试相关
  77. testImplementation 'junit:junit:4.13-beta-2'
  78. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  79. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  80. implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
  81. //支持包
  82. implementation 'androidx.appcompat:appcompat:1.6.0-alpha01'
  83. implementation 'com.google.android.material:material:1.6.0-beta01'
  84. // implementation 'com.google.android.material:material:1.0.0'
  85. // implementation 'androidx.appcompat:appcompat:1.0.0'
  86. implementation 'androidx.recyclerview:recyclerview:1.2.1'
  87. //implementation 'com.google.android.material:material:1.0.0'
  88. implementation 'androidx.cardview:cardview:1.0.0'
  89. implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
  90. // QMUI框架 link: http://qmuiteam.com/android
  91. // 本App 搭建的基础框架,基本使用控件功能请看官网的功能列表
  92. // implementation 'com.qmuiteam:qmui:1.2.0'
  93. // implementation 'com.qmuiteam:arch:0.3.1'
  94. // implementation 'com.qmuiteam:qmui:1.2.0'
  95. implementation 'com.qmuiteam:arch:2.0.0-alpha10'
  96. implementation 'com.qmuiteam:qmui:2.0.0-alpha10'
  97. // RecyclerAdapter框架
  98. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.46'
  99. // OKGO网络协议封装框架
  100. implementation 'com.lzy.net:okgo:3.0.4'
  101. implementation 'com.google.code.gson:gson:2.8.0'
  102. // easyPermissions权限管理
  103. implementation 'pub.devrel:easypermissions:2.0.1'
  104. // butterKnife黄油刀
  105. implementation "com.jakewharton:butterknife:$rootProject.butterknife"
  106. annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterknife"
  107. // SuperTextView 属性控件
  108. implementation 'com.github.lygttpod:SuperTextView:2.1.8'
  109. // android-saripaar 基于规则的Android表单验证库
  110. implementation 'com.mobsandgeeks:android-saripaar:2.0.3'
  111. // litePal 数据库操作框架
  112. implementation 'org.litepal.android:java:3.0.0'
  113. // SmartShow Toast框架,解决不同机型弹出方式缺陷问题
  114. implementation 'com.github.the-pig-of-jungle.smart-show:toast:2.6.7'
  115. // debug调试app本地数据库
  116. debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
  117. // log日志框架
  118. implementation 'com.orhanobut:logger:2.2.0'
  119. // leak 内存泄漏检测
  120. // debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3'
  121. // releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
  122. // // Optional, if you use support library fragments:
  123. // debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.3'
  124. // implementation files('libs/commons-codec-1.6.jar')
  125. //Modbus
  126. implementation 'com.github.licheedev:Modbus4Android:2.0.2'
  127. //下载进度条
  128. implementation 'com.github.Ccapton:Android-ColorfulProgressBar:1.0.5'
  129. //表格控件
  130. implementation 'com.github.huangyanbin:SmartTable:2.2.0'
  131. //轮播图
  132. implementation 'com.youth.banner:banner:1.4.10'
  133. // //图片加载
  134. // implementation 'com.github.bumptech.glide:glide:4.11.0'
  135. // annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
  136. implementation 'com.yanzhenjie:permission:2.0.0-rc12'
  137. //滑动快
  138. implementation 'io.github.litao0621:nifty-slider:1.4.0'
  139. //阿里云文件上传
  140. implementation 'com.aliyun.dpa:oss-android-sdk:2.5.0'
  141. //轻量级sw
  142. implementation 'com.github.zcweng:switch-button:0.0.3@aar'
  143. //阿里云IOT
  144. implementation ('com.aliyun.alink.linksdk:lp-iot-linkkit:1.7.3.2')
  145. implementation 'com.github.SheHuan:NiceImageView:1.0.5'
  146. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6'
  147. implementation 'com.github.xingshuangs:iot-communication:1.5.0'
  148. //MQTT
  149. // implementation files('libs\\org.eclipse.paho.android.service-1.1.1.jar')
  150. // implementation files('libs\\org.eclipse.paho.client.mqttv3-1.2.5.jar')
  151. //日志工具 可定位代码行数
  152. api 'com.apkfuns.logutils:library:1.7.5'
  153. api 'com.squareup.okhttp3:okhttp:3.12.0'
  154. api 'org.greenrobot:eventbus:3.1.1'
  155. api 'com.github.bumptech.glide:glide:4.16.0'
  156. annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
  157. api "com.github.bumptech.glide:okhttp3-integration:4.16.0"
  158. api 'pl.droidsonroids.gif:android-gif-drawable:1.2.19'
  159. implementation "com.github.bumptech.glide:okhttp3-integration:4.16.0"
  160. implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
  161. implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
  162. //leak 内存泄漏检测
  163. // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-alpha-3'
  164. //腾讯bugly
  165. //sdk地址 https://bugly.qq.com/docs/user-guide/instruction-manual-android/?v=1.0.0
  166. implementation 'com.tencent.bugly:crashreport:latest.release' //其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如4.0.3
  167. //选择器 时间
  168. implementation 'com.contrarywind:Android-PickerView:3.2.6'
  169. }