build.gradle 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. apply plugin: "com.android.application"
  2. def releaseTime() {
  3. return new Date().format("yyyyMMddHHmmss")
  4. }
  5. android {
  6. compileSdkVersion 28
  7. defaultConfig {
  8. applicationId "com.edufound.android.xyyf"
  9. minSdkVersion 19
  10. targetSdkVersion 28
  11. versionCode 10020
  12. versionName "1.0.0.2.0"
  13. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  14. multiDexEnabled true
  15. flavorDimensions "versionCode"
  16. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2011"]//添加一个默认渠道号
  17. }
  18. signingConfigs {
  19. efunbox {
  20. keyAlias "edufound_key"
  21. keyPassword "edufound321"
  22. storeFile file("C:/Users/candy/Desktop/efunbox/edufound.keystore")
  23. storePassword "edufound123"
  24. }
  25. debug {
  26. keyAlias "edufound_key"
  27. keyPassword "edufound321"
  28. storeFile file("C:/Users/candy/Desktop/efunbox/edufound.keystore")
  29. storePassword "edufound123"
  30. }
  31. }
  32. buildTypes {
  33. release {
  34. minifyEnabled false
  35. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  36. signingConfig signingConfigs.efunbox
  37. // zipAlignEnabled true
  38. applicationVariants.all { variant ->
  39. variant.outputs.each { output ->
  40. def outputFile = output.outputFileName
  41. if (outputFile != null && output.outputFileName.endsWith('.apk')) {
  42. def fileName = "efunbox_mobile_xyyf_v${defaultConfig.versionCode}_${releaseTime()}_${variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE}_r.apk"
  43. def channel = variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE;
  44. def newoutputFile = "";
  45. if (channel == ("2011")) {
  46. newoutputFile = "\\华为联运\\"
  47. } else if (channel == ("2005")) {
  48. newoutputFile = "\\华为不联运\\"
  49. }
  50. output.outputFileName = new File(newoutputFile, fileName)
  51. }
  52. }
  53. }
  54. }
  55. debug {
  56. minifyEnabled false
  57. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  58. signingConfig signingConfigs.efunbox
  59. }
  60. }
  61. repositories {
  62. flatDir {
  63. dirs "libs"
  64. }
  65. mavenCentral()
  66. }
  67. sourceSets {
  68. main {
  69. jniLibs.srcDirs = ["libs"]
  70. }
  71. }
  72. productFlavors {
  73. //华为联运
  74. channel_huaweilianyun {
  75. signingConfig signingConfigs.efunbox
  76. manifestPlaceholders = [
  77. appCode: "2011",
  78. appIcon: "@drawable/icon",
  79. ]
  80. }
  81. //华为不联运
  82. channel_huawei {
  83. signingConfig signingConfigs.efunbox
  84. manifestPlaceholders = [
  85. appCode: "2005",
  86. appIcon: "@drawable/icon",
  87. ]
  88. }
  89. }
  90. productFlavors.all {
  91. flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
  92. }
  93. }
  94. allprojects {
  95. repositories {
  96. jcenter()
  97. }
  98. }
  99. dependencies {
  100. implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
  101. implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  102. implementation "com.android.support:appcompat-v7:28.0.0"
  103. implementation "android.arch.navigation:navigation-fragment:1.0.0"
  104. implementation "android.arch.navigation:navigation-ui:1.0.0"
  105. api files("libs/codec.jar")
  106. api files("libs/commons-codec-1.7.jar")
  107. api files("libs/commons-lang-2.2.jar")
  108. api files("libs/commons-net-3.3.jar")
  109. api "com.google.code.gson:gson:2.8.6"
  110. implementation 'com.alibaba:fastjson:1.2.73'
  111. //微信登录、微信支付等
  112. implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
  113. //支付宝支付
  114. // implementation files("libs/alipaySdk-20180601.jar")
  115. // implementation files("libs/dom4j-1.6.1.jar")
  116. //okhttp
  117. implementation "com.squareup.okhttp3:okhttp:3.4.1"
  118. //多种seekbar
  119. implementation "com.github.warkiz.widget:indicatorseekbar:2.1.0"
  120. // //PushSDK必须依赖基础组件库,所以需要加入对应依赖
  121. // implementation "com.umeng.umsdk:common:2.1.0"
  122. // //PushSDK
  123. // implementation "com.umeng.umsdk:push:6.0.1"
  124. //cardView
  125. implementation 'com.android.support:cardview-v7:28.0.0'
  126. //recyclerview
  127. implementation 'com.android.support:recyclerview-v7:28.0.0'
  128. //wheelview
  129. implementation 'com.cncoderx.wheelview:library:1.2.5'
  130. //阿里一键登录和校验
  131. // implementation(name: 'crashshield-release', ext: 'aar')
  132. // implementation(name: 'phoneNumber-L-AuthSDK-2.11.1.1', ext: 'aar')
  133. implementation 'com.huawei.hms:hwid:5.2.0.300'
  134. implementation 'com.huawei.hms:iap:5.1.0.300'
  135. implementation 'com.huawei.hms:appservice:5.0.4.303'
  136. implementation 'com.huawei.hms:hianalytics:5.2.0.301'
  137. // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
  138. implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
  139. implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
  140. }