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.
 
 
 

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