build.gradle 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. }
  5. apply plugin: 'kotlin-android'
  6. apply plugin: 'kotlin-android-extensions'
  7. android {
  8. signingConfigs {
  9. udapda {
  10. keyAlias 'as_xinmaiwei_wms'
  11. keyPassword 'pdakeystone'
  12. storeFile file('C:\\sigin\\xinmaiwei_wms.jks')
  13. storePassword 'pdakeystone'
  14. }
  15. }
  16. compileSdkVersion rootProject.ext.android.compileSdkVersion
  17. buildToolsVersion rootProject.ext.android.buildToolsVersion
  18. defaultConfig {
  19. applicationId "uas.erp.xinmaiwei_wms"
  20. minSdkVersion rootProject.ext.android.minSdkVersion
  21. targetSdkVersion rootProject.ext.android.targetSdkVersion
  22. versionCode rootProject.ext.android.versionCode
  23. versionName rootProject.ext.android.versionName
  24. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  25. multiDexEnabled true // 确保启用多DEX支持
  26. javaCompileOptions {
  27. annotationProcessorOptions {
  28. includeCompileClasspath = true
  29. }
  30. }
  31. ndk {
  32. //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
  33. abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
  34. }
  35. }
  36. bundle {
  37. language {
  38. enableSplit = false
  39. }
  40. density {
  41. enableSplit = false
  42. }
  43. }
  44. buildTypes {
  45. release {
  46. minifyEnabled false // 是否启用代码混淆,默认是false
  47. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  48. }
  49. }
  50. compileOptions {
  51. sourceCompatibility JavaVersion.VERSION_1_8
  52. targetCompatibility JavaVersion.VERSION_1_8
  53. }
  54. // buildFeatures {
  55. // viewBinding true
  56. // }
  57. // kotlinOptions {
  58. // jvmTarget = '1.8'
  59. // }
  60. packagingOptions {
  61. exclude 'META-INF/LICENSE.txt'
  62. exclude 'META-INF/NOTICE.txt'
  63. }
  64. applicationVariants.all { variant ->
  65. variant.outputs.all { output ->
  66. def outputFile = output.outputFile
  67. def fileName
  68. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  69. if (variant.buildType.name.equals('release')) {
  70. def releaseInfo = getVersionName()
  71. // def timeR = new Date().format("yyyyMMdd_HH-mm-ss")
  72. // fileName = "新迈威_WMS_RELEASE_${releaseInfo}_${timeR}.apk"
  73. fileName = "新迈威_WMS_RELEASE_${releaseInfo}.apk"
  74. } else if (variant.buildType.name.equals('debug')) {
  75. def debugInfo = getVersionName()
  76. def timeD = new Date().format("yyyyMMdd_HH-mm-ss")
  77. fileName = "UAS_PDA_XZC_PRODUCTIONLINE_DEBUG_${debugInfo}_${timeD}.apk"
  78. }
  79. outputFileName = fileName
  80. }
  81. }
  82. }
  83. }
  84. def getVersionName() {
  85. return rootProject.ext.android.versionName
  86. }
  87. dependencies {
  88. implementation fileTree(include: ['*.jar'], dir: 'libs')
  89. implementation 'androidx.appcompat:appcompat:1.2.0'
  90. implementation 'com.google.android.material:material:1.2.1'
  91. implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
  92. api files('libs/volley.jar')
  93. api files('libs/gson-2.2.4.jar')
  94. api project(':pulltoreflashlibrary')
  95. api project(':progresslitelibrary')
  96. api project(':lib-zxing')
  97. api project(':bluetooth')
  98. // implementation deps.appcompatV7
  99. // implementation deps.recyclerview
  100. implementation deps.stetho
  101. implementation deps.fastjson
  102. implementation deps.xUtils
  103. implementation deps.okhttp
  104. implementation deps.switchView
  105. // implementation deps.BaseRecyclerViewAdapterHelper
  106. // implementation deps.smartRefreshLayout
  107. // implementation deps.smartRefreshHeader
  108. // implementation deps.permisson //权限不在兼容
  109. implementation deps.basePopup
  110. implementation deps.smartTable
  111. // implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper:3.0.14"
  112. // implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper:3.0.7"
  113. implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.7" //从3.x.x开始支持AndroidX
  114. // implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.6" //从3.x.x开始支持AndroidX
  115. //implementation 'com.androidx.support:multidex:1.0.3'
  116. implementation 'androidx.multidex:multidex:2.0.1' //支持AndroidX的版本
  117. // SmartRefreshLayout兼容AndroidX 基础库
  118. // implementation 'com.scwang.smart:refresh-layout-kernel:2.1.0'
  119. // // 经典头部
  120. // implementation 'com.scwang.smart:refresh-header-classics:2.1.0'
  121. implementation 'io.github.scwang90:refresh-layout-kernel:3.0.0-alpha' //列表核心必须依赖
  122. implementation 'io.github.scwang90:refresh-header-classics:3.0.0-alpha' //列表经典刷新头
  123. // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
  124. implementation 'com.umeng.umsdk:common:9.4.4' //(必选)
  125. implementation 'com.umeng.umsdk:asms:1.4.1' // asms包依赖(必选)
  126. implementation 'com.umeng.umsdk:apm:1.5.2' // U-APM包依赖(必选) 错误分析升级为独立SDK,看crash数据请一定集成
  127. //权限工具
  128. implementation 'com.permissionx.guolindev:permissionx:1.3.0'
  129. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  130. implementation "org.jetbrains.anko:anko-commons:$anko_version"
  131. }