build.gradle 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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.xiaoai"
  9. minSdkVersion 16
  10. targetSdkVersion 28
  11. versionCode 10018
  12. versionName "1.0.0.1.8"
  13. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  14. multiDexEnabled true
  15. flavorDimensions "versionCode"
  16. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2013"]//添加一个默认渠道号
  17. ndk {
  18. //选择要添加的对应 cpu 类型的 .so 库。
  19. // abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a','x86_64'
  20. // 还可以添加 'x86', , 'mips', 'mips64'
  21. }
  22. }
  23. signingConfigs {
  24. efunbox {
  25. keyAlias "edufound_key"
  26. keyPassword "edufound321"
  27. storeFile file("C:\\Users\\candy\\Desktop\\efunbox\\edufound.keystore")
  28. storePassword "edufound123"
  29. }
  30. debug {
  31. keyAlias "edufound_key"
  32. keyPassword "edufound321"
  33. storeFile file("C:\\Users\\candy\\Desktop\\efunbox\\edufound.keystore")
  34. storePassword "edufound123"
  35. }
  36. }
  37. buildTypes {
  38. release {
  39. minifyEnabled false
  40. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  41. signingConfig signingConfigs.efunbox
  42. // zipAlignEnabled true
  43. applicationVariants.all { variant ->
  44. variant.outputs.each { output ->
  45. def outputFile = output.outputFileName
  46. if (outputFile != null && output.outputFileName.endsWith('.apk')) {
  47. def fileName = "efunbox_mobile_xyyf_v${defaultConfig.versionCode}_${releaseTime()}_${variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE}_r.apk"
  48. def channel = variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE;
  49. def newoutputFile = "";
  50. if (channel == ("2013")) {
  51. newoutputFile = "\\小爱音响\\"
  52. }
  53. output.outputFileName = new File(newoutputFile, fileName)
  54. }
  55. }
  56. }
  57. }
  58. debug {
  59. minifyEnabled false
  60. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  61. signingConfig signingConfigs.efunbox
  62. }
  63. }
  64. repositories {
  65. flatDir {
  66. dirs "libs"
  67. }
  68. mavenCentral()
  69. }
  70. sourceSets {
  71. main {
  72. jniLibs.srcDirs = ["libs"]
  73. }
  74. }
  75. productFlavors {
  76. channel_xiaoaiyinxiang {
  77. signingConfig signingConfigs.efunbox
  78. manifestPlaceholders = [
  79. appCode: "2013",
  80. appIcon: "@drawable/icon",
  81. ]
  82. }
  83. }
  84. productFlavors.all {
  85. flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
  86. }
  87. }
  88. allprojects {
  89. repositories {
  90. jcenter()
  91. }
  92. }
  93. dependencies {
  94. implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
  95. implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  96. implementation "com.android.support:appcompat-v7:28.0.0"
  97. implementation "android.arch.navigation:navigation-fragment:1.0.0"
  98. implementation "android.arch.navigation:navigation-ui:1.0.0"
  99. api files("libs/codec.jar")
  100. api files("libs/commons-codec-1.7.jar")
  101. api files("libs/commons-lang-2.2.jar")
  102. api files("libs/commons-net-3.3.jar")
  103. api files("libs/bcprov-jdk15-136.jar")
  104. api "com.google.code.gson:gson:2.8.6"
  105. implementation 'com.alibaba:fastjson:1.2.73'
  106. //微信登录、微信支付等
  107. implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
  108. //支付宝支付
  109. // implementation files("libs/alipaySdk-20180601.jar")
  110. // implementation files("libs/dom4j-1.6.1.jar")
  111. //okhttp
  112. implementation "com.squareup.okhttp3:okhttp:3.4.1"
  113. //多种seekbar
  114. implementation "com.github.warkiz.widget:indicatorseekbar:2.1.0"
  115. implementation "com.umeng.umsdk:xiaomi-umengaccs:1.1.0"
  116. //cardView
  117. implementation 'com.android.support:cardview-v7:28.0.0'
  118. //recyclerview
  119. implementation 'com.android.support:recyclerview-v7:28.0.0'
  120. //wheelview
  121. implementation 'com.cncoderx.wheelview:library:1.2.5'
  122. //阿里一键登录和校验
  123. // implementation(name: 'crashshield-release', ext: 'aar')
  124. // implementation(name: 'phoneNumber-L-AuthSDK-2.11.1.1', ext: 'aar')
  125. }