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.
 
 
 

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