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.
 
 
 

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