build.gradle 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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: "2012"]//添加一个默认渠道号
  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 == ("2012")) {
  46. newoutputFile = "\\tmail\\"
  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_tmail {
  73. signingConfig signingConfigs.efunbox
  74. manifestPlaceholders = [
  75. appCode: "2012",
  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 files("libs/bcprov-jdk15-136.jar")
  100. api "com.google.code.gson:gson:2.8.6"
  101. implementation 'com.alibaba:fastjson:1.2.73'
  102. // implementation files("libs/dom4j-1.6.1.jar")
  103. //okhttp
  104. implementation "com.squareup.okhttp3:okhttp:3.4.1"
  105. //多种seekbar
  106. implementation "com.github.warkiz.widget:indicatorseekbar:2.1.0"
  107. //
  108. //cardView
  109. implementation 'com.android.support:cardview-v7:28.0.0'
  110. //recyclerview
  111. implementation 'com.android.support:recyclerview-v7:28.0.0'
  112. //wheelview
  113. implementation 'com.cncoderx.wheelview:library:1.2.5'
  114. api files("libs/gcs-authservice-1.0.0.21.jar")
  115. api files("libs/registry-api-1.1.16-20201203.085134-3.jar")
  116. api files("libs/aranger.jar")
  117. // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
  118. implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
  119. implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
  120. }