build.gradle 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. apply plugin: 'com.android.application'
  2. //apply plugin: 'AndResGuard'
  3. android {
  4. signingConfigs {
  5. udapda {
  6. keyAlias 'baigang_workshop_workstation_alias'
  7. keyPassword 'pdakeystone'
  8. storeFile file('C:\\sigin\\baigang_workshop_workstation.jks')
  9. storePassword 'pdakeystone'
  10. }
  11. }
  12. compileSdkVersion rootProject.ext.android.compileSdkVersion
  13. buildToolsVersion rootProject.ext.android.buildToolsVersion
  14. defaultConfig {
  15. applicationId "com.uas.baigang_workshop_workstation"
  16. minSdkVersion rootProject.ext.android.minSdkVersion
  17. targetSdkVersion rootProject.ext.android.targetSdkVersion
  18. versionCode rootProject.ext.android.versionCode
  19. versionName rootProject.ext.android.versionName
  20. javaCompileOptions {
  21. annotationProcessorOptions {
  22. includeCompileClasspath = true
  23. }
  24. }
  25. multiDexEnabled true
  26. ndk {
  27. //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
  28. abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
  29. }
  30. }
  31. buildTypes {
  32. release {
  33. minifyEnabled false
  34. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  35. }
  36. }
  37. packagingOptions {
  38. exclude 'META-INF/LICENSE.txt'
  39. exclude 'META-INF/NOTICE.txt'
  40. }
  41. applicationVariants.all { variant ->
  42. variant.outputs.all { output ->
  43. def outputFile = output.outputFile
  44. def fileName
  45. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  46. if (variant.buildType.name.equals('release')) {
  47. def releaseInfo = getVersionName()
  48. fileName = "百岗_车间工作站_RELEASE_${releaseInfo}.apk"
  49. } else if (variant.buildType.name.equals('debug')) {
  50. def debugInfo = getVersionName()
  51. fileName = "UAS_PDA_YITAO_PRODUCTIONLINE_DEBUG_${debugInfo}.apk"
  52. }
  53. outputFileName = fileName
  54. }
  55. }
  56. }
  57. compileOptions {
  58. targetCompatibility 1.8
  59. sourceCompatibility 1.8
  60. }
  61. }
  62. dependencies {
  63. implementation fileTree(include: ['*.jar'], dir: 'libs')
  64. testImplementation 'junit:junit:4.12'
  65. api files('libs/volley.jar')
  66. api files('libs/gson-2.2.4.jar')
  67. api project(':pulltoreflashlibrary')
  68. api project(':progresslitelibrary')
  69. api project(':lib-zxing')
  70. implementation deps.appcompatV7
  71. implementation deps.stetho
  72. implementation deps.fastjson
  73. implementation deps.xUtils
  74. implementation deps.okhttp
  75. implementation project(':bluetooth')
  76. api deps.smartTable
  77. implementation deps.switchView
  78. implementation deps.BaseRecyclerViewAdapterHelper
  79. implementation deps.smartRefreshLayout
  80. implementation deps.smartRefreshHeader
  81. implementation deps.recyclerview
  82. implementation deps.permisson
  83. implementation deps.basePopup
  84. implementation 'com.umeng.umsdk:common:9.4.0'// 必选
  85. implementation 'com.umeng.umsdk:asms:1.2.3'// 必选
  86. implementation 'com.umeng.umsdk:apm:1.4.0' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
  87. implementation 'org.greenrobot:eventbus:3.2.0'
  88. implementation 'com.contrarywind:Android-PickerView:4.1.9'
  89. //OKGO
  90. implementation 'com.lzy.net:okgo:3.0.4'
  91. implementation 'com.lzy.net:okrx2:2.0.2'
  92. implementation 'com.lzy.net:okserver:2.0.5'
  93. implementation 'com.contrarywind:Android-PickerView:4.1.9'
  94. implementation 'com.android.support:design:28.0.0'
  95. }
  96. def getVersionName() {
  97. return rootProject.ext.android.versionName
  98. }
  99. /*andResGuard {
  100. // mappingFile = file("./resource_mapping.txt")
  101. mappingFile = null
  102. use7zip = true
  103. useSign = true
  104. // 打开这个开关,会keep住所有资源的原始路径,只混淆资源的名字
  105. keepRoot = false
  106. whiteList = [
  107. // for your icon
  108. "R.mipmap.icon",
  109. // for fabric
  110. "R.string.com.crashlytics.*",
  111. // for google-services
  112. "R.string.google_app_id",
  113. "R.string.gcm_defaultSenderId",
  114. "R.string.default_web_client_id",
  115. "R.string.ga_trackingId",
  116. "R.string.firebase_database_url",
  117. "R.string.google_api_key",
  118. "R.string.google_crash_reporting_api_key",
  119. //for umeng
  120. "R.anim.umeng*",
  121. "R.string.umeng*",
  122. "R.string.UM*",
  123. "R.string.tb_*",
  124. "R.layout.umeng*",
  125. "R.layout.socialize_*",
  126. "R.layout.*messager*",
  127. "R.layout.tb_*",
  128. "R.color.umeng*",
  129. "R.color.tb_*",
  130. "R.style.*UM*",
  131. "R.style.umeng*",
  132. "R.drawable.umeng*",
  133. "R.drawable.tb_*",
  134. "R.drawable.sina*",
  135. "R.drawable.qq_*",
  136. "R.drawable.tb_*",
  137. "R.id.umeng*",
  138. "R.id.*messager*",
  139. "R.id.progress_bar_parent",
  140. "R.id.socialize_*",
  141. "R.id.webView",
  142. //for jpush
  143. "R.drawable.jpush_notification_icon"
  144. ]
  145. compressFilePattern = [
  146. "*.png",
  147. "*.jpg",
  148. "*.jpeg",
  149. "*.gif",
  150. ]
  151. sevenzip {
  152. artifact = 'com.tencent.mm:SevenZip:1.2.13'
  153. //path = "/usr/local/bin/7za"
  154. }
  155. *//**
  156. * 可选: 如果不设置则会默认覆盖assemble输出的apk
  157. **//*
  158. // finalApkBackupPath = "${project.rootDir}/final.apk"
  159. *//**
  160. * 可选: 指定v1签名时生成jar文件的摘要算法
  161. * 默认值为“SHA-1”
  162. **//*
  163. // digestalg = "SHA-256"
  164. }*/