build.gradle 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.getkeepsafe.dexcount'
  3. apply plugin: 'me.tatarka.retrolambda'
  4. android {
  5. compileOptions {
  6. sourceCompatibility JavaVersion.VERSION_1_8
  7. targetCompatibility JavaVersion.VERSION_1_8
  8. }
  9. signingConfigs {
  10. config {
  11. storeFile file('C:/sigin/applicationsignname[20150409]')
  12. storePassword '13237658359'
  13. keyAlias 'jie-20150409'
  14. keyPassword '13237658359'
  15. }
  16. }
  17. compileSdkVersion rootProject.ext.android.compileSdkVersion
  18. buildToolsVersion rootProject.ext.android.buildToolsVersion
  19. defaultConfig {
  20. applicationId project.applicationId
  21. minSdkVersion rootProject.ext.android.minSdkVersion
  22. targetSdkVersion rootProject.ext.android.targetSdkVersion
  23. versionCode rootProject.ext.android.versionCode
  24. versionName rootProject.ext.android.versionName
  25. multiDexEnabled true
  26. signingConfig signingConfigs.config
  27. // 默认是umeng的渠道
  28. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  29. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "umeng"]
  30. ndk {
  31. abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
  32. }
  33. }
  34. useLibrary 'org.apache.http.legacy'
  35. lintOptions {
  36. abortOnError false
  37. }
  38. packagingOptions {
  39. exclude 'META-INF/LICENSE.txt'
  40. exclude 'META-INF/NOTICE.txt'
  41. }
  42. buildTypes {
  43. release {
  44. minifyEnabled false
  45. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
  46. signingConfig signingConfigs.config
  47. }
  48. debug {
  49. signingConfig signingConfigs.config
  50. }
  51. }
  52. productFlavors { // 友盟多渠道打包
  53. wandoujia {}
  54. _360 {}
  55. baidu {}
  56. xiaomi {}
  57. tencent {}
  58. taobao {}
  59. }
  60. productFlavors.all {
  61. flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
  62. }
  63. //给apk添加对应的版本号:这里暂时注释但保留
  64. // applicationVariants.all { variant ->
  65. // variant.outputs.each { output ->
  66. // def outputFile = output.outputFile
  67. // if (outputFile != null && outputFile.name.endsWith('.apk')) {
  68. // def fileName = outputFile.name.replace(".apk", "-${defaultConfig.versionName}.apk")
  69. // output.outputFile = new File(outputFile.parent, fileName)
  70. // }
  71. // }
  72. // }
  73. }
  74. dependencies {
  75. compile fileTree(include: ['*.jar'], dir: 'libs')
  76. //依赖库
  77. testCompile deps.junit
  78. compile deps.appcompatV7
  79. compile deps.cardviewV7
  80. compile deps.design
  81. compile(deps.stetho) {
  82. force = true
  83. }
  84. compile deps.jodatime
  85. compile deps.systembartint
  86. compile deps.photoView
  87. compile deps.tagGroup
  88. compile deps.analytics
  89. compile deps.activityOnCrash
  90. compile deps.stickyListHeaders
  91. compile deps.stickyGridHeaders
  92. compile deps.materialDialogs
  93. compile deps.okhttp
  94. androidTestCompile deps.leakcanaryNp
  95. debugCompile deps.leakcanary
  96. releaseCompile deps.leakcanaryNp
  97. //project
  98. compile project(':common')
  99. compile project(':network')
  100. compile project(':imageload')
  101. compile project(':applogin')
  102. compile project(':appcontact')
  103. compile project(':appme')
  104. compile project(':appworks')
  105. compile project(":appbooking")
  106. compile project(':android-pdf-viewer')
  107. }
  108. buildscript {
  109. repositories {
  110. mavenCentral()
  111. }
  112. dependencies {
  113. classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.4'
  114. }
  115. }
  116. dexcount {
  117. format = "json"
  118. includeClasses = false
  119. includeFieldCount = true
  120. includeTotalMethodCount = false
  121. orderByMethodCount = false
  122. verbose = false
  123. maxTreeDepth = Integer.MAX_VALUE
  124. teamCityIntegration = false
  125. enableForInstantRun = false
  126. }