build.gradle 6.6 KB

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