build.gradle 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. android {
  5. signingConfigs {
  6. pda_storage {
  7. keyAlias 'yt_yuejiahong_alias'
  8. keyPassword 'pdakeystone'
  9. storeFile file('C:/sigin/yt_yuejiahong.jks')
  10. storePassword 'pdakeystone'
  11. }
  12. }
  13. compileSdkVersion rootProject.ext.android.compileSdkVersion
  14. buildToolsVersion rootProject.ext.android.buildToolsVersion
  15. defaultConfig {
  16. applicationId "com.uas.yuejiahong"
  17. minSdkVersion rootProject.ext.android.minSdkVersion
  18. targetSdkVersion rootProject.ext.android.targetSdkVersion
  19. versionCode rootProject.ext.android.versionCode
  20. versionName rootProject.ext.android.versionName
  21. javaCompileOptions {
  22. annotationProcessorOptions {
  23. includeCompileClasspath = true
  24. }
  25. }
  26. }
  27. buildTypes {
  28. release {
  29. minifyEnabled true
  30. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  31. }
  32. }
  33. packagingOptions {
  34. exclude 'META-INF/LICENSE.txt'
  35. exclude 'META-INF/NOTICE.txt'
  36. }
  37. applicationVariants.all { variant ->
  38. variant.outputs.all { output ->
  39. def outputFile = output.outputFile
  40. def fileName
  41. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  42. if (variant.buildType.name.equals('release')) {
  43. def releaseInfo = getVersionName()
  44. fileName = "UAS_YUEJIAHONGE_RELEASE_${releaseInfo}.apk"
  45. } else if (variant.buildType.name.equals('debug')) {
  46. def debugInfo = getVersionName()
  47. fileName = "UAS_YUEJIAHONG_DEBUG_${debugInfo}.apk"
  48. }
  49. outputFileName = fileName
  50. }
  51. }
  52. }
  53. compileOptions {
  54. targetCompatibility 1.8
  55. sourceCompatibility 1.8
  56. }
  57. }
  58. dependencies {
  59. implementation fileTree(include: ['*.jar'], dir: 'libs')
  60. implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
  61. testImplementation 'junit:junit:4.12'
  62. api files('libs/volley.jar')
  63. api files('libs/gson-2.2.4.jar')
  64. api project(':pulltoreflashlibrary')
  65. api project(':progresslitelibrary')
  66. api project(':lib-zxing')
  67. api deps.appcompatV7
  68. api deps.stetho
  69. api deps.fastjson
  70. api deps.xUtils
  71. api deps.okhttp
  72. implementation deps.recyclerview
  73. implementation deps.BaseRecyclerViewAdapterHelper
  74. implementation deps.smartRefreshLayout
  75. implementation deps.smartRefreshHeader
  76. implementation deps.permisson
  77. implementation deps.smartTable
  78. implementation deps.basePopup
  79. implementation 'com.umeng.umsdk:common:9.4.0'// 必选
  80. implementation 'com.umeng.umsdk:asms:1.2.3'// 必选
  81. implementation 'com.umeng.umsdk:apm:1.4.0' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
  82. implementation 'org.greenrobot:eventbus:3.1.1'
  83. }
  84. def getVersionName() {
  85. return rootProject.ext.android.versionName
  86. }