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 10011
  12. versionName "1.0.0.1.1"
  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\\义方教育\\edufound\\edufound.keystore")
  23. storePassword "edufound123"
  24. }
  25. debug {
  26. keyAlias "edufound_key"
  27. keyPassword "edufound321"
  28. storeFile file("C:\\Users\\Candy\\Desktop\\义方教育\\edufound\\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. }
  48. output.outputFileName = new File(newoutputFile, fileName)
  49. }
  50. }
  51. }
  52. }
  53. debug {
  54. minifyEnabled false
  55. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  56. signingConfig signingConfigs.efunbox
  57. }
  58. }
  59. repositories {
  60. flatDir {
  61. dirs "libs"
  62. }
  63. mavenCentral()
  64. }
  65. sourceSets {
  66. main {
  67. jniLibs.srcDirs = ["libs"]
  68. }
  69. }
  70. productFlavors {
  71. //义方
  72. channel_huaweilianyun {
  73. signingConfig signingConfigs.efunbox
  74. manifestPlaceholders = [
  75. appCode: "2011",
  76. appIcon: "@drawable/icon",
  77. ]
  78. }
  79. }
  80. productFlavors.all {
  81. flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
  82. }
  83. }
  84. allprojects {
  85. repositories {
  86. jcenter()
  87. }
  88. }
  89. dependencies {
  90. implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
  91. implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  92. implementation "com.android.support:appcompat-v7:28.0.0"
  93. implementation "android.arch.navigation:navigation-fragment:1.0.0"
  94. implementation "android.arch.navigation:navigation-ui:1.0.0"
  95. api files("libs/codec.jar")
  96. api files("libs/commons-codec-1.7.jar")
  97. api files("libs/commons-lang-2.2.jar")
  98. api files("libs/commons-net-3.3.jar")
  99. api "com.google.code.gson:gson:2.8.6"
  100. implementation 'com.alibaba:fastjson:1.2.73'
  101. //微信登录、微信支付等
  102. implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
  103. //支付宝支付
  104. // implementation files("libs/alipaySdk-20180601.jar")
  105. // implementation files("libs/dom4j-1.6.1.jar")
  106. //okhttp
  107. implementation "com.squareup.okhttp3:okhttp:3.4.1"
  108. //多种seekbar
  109. implementation "com.github.warkiz.widget:indicatorseekbar:2.1.0"
  110. // //PushSDK必须依赖基础组件库,所以需要加入对应依赖
  111. // implementation "com.umeng.umsdk:common:2.1.0"
  112. // //PushSDK
  113. // implementation "com.umeng.umsdk:push:6.0.1"
  114. api project(":push")
  115. //小米Push通道
  116. implementation "com.umeng.umsdk:xiaomi-push:3.6.17"
  117. implementation "com.umeng.umsdk:xiaomi-umengaccs:1.1.0"
  118. //魅族Push通道
  119. implementation "com.umeng.umsdk:meizu-push:3.8.1"
  120. implementation "com.umeng.umsdk:meizu-umengaccs:1.0.6"
  121. //vivo Push通道
  122. implementation "com.umeng.umsdk:vivo-push:2.3.1"
  123. implementation "com.umeng.umsdk:vivo-umengaccs:1.0.4"
  124. //Oppo Push通道
  125. implementation "com.umeng.umsdk:oppo-push:1.0.1"
  126. implementation "com.umeng.umsdk:oppo-umengaccs:1.0.3"
  127. //cardView
  128. implementation 'com.android.support:cardview-v7:28.0.0'
  129. //recyclerview
  130. implementation 'com.android.support:recyclerview-v7:28.0.0'
  131. //wheelview
  132. implementation 'com.cncoderx.wheelview:library:1.2.5'
  133. //阿里一键登录和校验
  134. // implementation(name: 'crashshield-release', ext: 'aar')
  135. // implementation(name: 'phoneNumber-L-AuthSDK-2.11.1.1', ext: 'aar')
  136. implementation 'com.huawei.hms:hwid:5.2.0.300'
  137. implementation 'com.huawei.hms:iap:5.1.0.300'
  138. implementation 'com.huawei.hms:appservice:5.0.4.303'
  139. implementation 'com.huawei.hms:hianalytics:5.2.0.301'
  140. }