build.gradle 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. apply plugin: 'com.android.application'
  2. android {
  3. lintOptions {
  4. checkReleaseBuilds false
  5. abortOnError false
  6. }
  7. signingConfigs {
  8. pda_storage {
  9. keyAlias 'pad_storage'
  10. keyPassword 'pdakeystone'
  11. storeFile file('C:\\sigin\\pda_storage.jks')
  12. storePassword 'pdakeystone'
  13. }
  14. }
  15. compileSdkVersion rootProject.ext.android.compileSdkVersion
  16. buildToolsVersion rootProject.ext.android.buildToolsVersion
  17. defaultConfig {
  18. applicationId "com.uas.storage_manage"
  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. javaCompileOptions {
  24. annotationProcessorOptions {
  25. includeCompileClasspath = true
  26. }
  27. }
  28. }
  29. buildTypes {
  30. release {
  31. minifyEnabled false
  32. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  33. lintOptions{
  34. checkReleaseBuilds false
  35. abortOnError false
  36. }
  37. }
  38. }
  39. packagingOptions {
  40. exclude 'META-INF/LICENSE.txt'
  41. exclude 'META-INF/NOTICE.txt'
  42. }
  43. applicationVariants.all { variant ->
  44. variant.outputs.all { output ->
  45. def outputFile = output.outputFile
  46. def fileName
  47. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  48. if (variant.buildType.name.equals('release')) {
  49. def releaseInfo = getVersionName()
  50. fileName = "泽天_UAS_STORAGE_RELEASE_${releaseInfo}.apk"
  51. } else if (variant.buildType.name.equals('debug')) {
  52. def debugInfo = getVersionName()
  53. fileName = "UAS_ZT_STORAGE_DEBUG_${debugInfo}.apk"
  54. }
  55. outputFileName = fileName
  56. }
  57. }
  58. }
  59. // configurations.all {
  60. // resolutionStrategy.eachDependency { DependencyResolveDetails details ->
  61. // def requested = details.requested
  62. // if (requested.group == 'com.android.support') {
  63. // if (!requested.name.startsWith("multidex")) {
  64. // details.useVersion '28.0.0'
  65. // }
  66. // }
  67. // }
  68. // }
  69. compileOptions {
  70. targetCompatibility 1.8
  71. sourceCompatibility 1.8
  72. }
  73. }
  74. dependencies {
  75. implementation fileTree(include: ['*.jar'], dir: 'libs')
  76. testImplementation 'junit:junit:4.12'
  77. api files('libs/volley.jar')
  78. api files('libs/gson-2.2.4.jar')
  79. api project(':pulltoreflashlibrary')
  80. api project(':progresslitelibrary')
  81. api project(':lib-zxing')
  82. implementation deps.appcompatV7
  83. implementation deps.stetho
  84. implementation deps.fastjson
  85. implementation deps.xUtils
  86. implementation deps.okhttp
  87. implementation deps.permisson
  88. implementation deps.recyclerview
  89. implementation deps.basePopup
  90. implementation deps.smartTable
  91. implementation deps.BaseRecyclerViewAdapterHelper
  92. implementation 'com.umeng.umsdk:common:9.4.0'// 必选
  93. implementation 'com.umeng.umsdk:asms:1.2.3'// 必选
  94. implementation 'com.umeng.umsdk:apm:1.4.0' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
  95. implementation 'org.greenrobot:eventbus:3.1.1'
  96. }
  97. def getVersionName() {
  98. return rootProject.ext.android.versionName
  99. }