build.gradle 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'android-aspectjx'
  3. apply plugin: 'com.huawei.agconnect' // HMS SDK gradle 插件
  4. apply plugin: "com.tencent.android.tpns"
  5. def releaseTime() {
  6. return new Date().format("MMdd_HHmm", TimeZone.getTimeZone("GMT+8:00"))
  7. }
  8. android {
  9. compileSdkVersion 31
  10. buildToolsVersion "29.0.3"
  11. defaultConfig {
  12. minSdkVersion 21
  13. targetSdkVersion 29
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. javaCompileOptions {
  16. annotationProcessorOptions {
  17. arguments = [AROUTER_MODULE_NAME: project.getName()]
  18. }
  19. }
  20. multiDexEnabled true
  21. flavorDimensions "default"
  22. ndk {
  23. // 设置支持的SO库架构
  24. abiFilters 'arm64-v8a', 'x86_64', 'armeabi-v7a'//, 'x86_64', 'armeabi-v7a', 'x86',
  25. }
  26. }
  27. compileOptions {
  28. sourceCompatibility JavaVersion.VERSION_1_8
  29. targetCompatibility JavaVersion.VERSION_1_8
  30. }
  31. signingConfigs {
  32. config {
  33. keyAlias 'key'
  34. keyPassword 'Hx6248**'
  35. storeFile file('../mugolive.jks')
  36. storePassword 'Hx6248**'
  37. }
  38. }
  39. buildTypes {
  40. release {
  41. minifyEnabled true//混淆
  42. shrinkResources true //删除无效引用
  43. signingConfig signingConfigs.config
  44. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  45. }
  46. debug {
  47. minifyEnabled false//混淆
  48. signingConfig signingConfigs.config
  49. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  50. }
  51. }
  52. sourceSets {
  53. main {
  54. jniLibs.srcDirs = ['libs']
  55. }
  56. }
  57. lintOptions {
  58. disable 'GoogleAppIndexingWarning'//忽略 Google Search(放于每个module的build.gradle文件中)
  59. }
  60. buildFeatures{
  61. dataBinding = true
  62. }
  63. productFlavors {
  64. //Mugo
  65. mugo {
  66. applicationId "com.mugo.live"
  67. versionCode 1
  68. versionName "1.0"
  69. manifestPlaceholders = [
  70. OpenInstallAppKey: "a4p4z6",//OpenInstall
  71. JPUSH_PKGNAME : applicationId,//极光
  72. JPUSH_CHANNEL : "developer-default",
  73. JPUSH_APPKEY : "84fdb198614f114ca8be6738",
  74. Tencent_BUGLY : "12289a52b6",//腾讯bugly
  75. Tencent_Map : "TYPBZ-FGGWJ-5JQFS-FLH5R-WXK5V-NSFGQ",//腾讯地图
  76. WX_PAY_APP_ID : "wx9477e94703095c92",//微信支付,AppId
  77. XG_ACCESS_ID : "1580010621",//腾讯TPNS accessid
  78. XG_ACCESS_KEY : "AW9JXX7NHY6M",//腾讯TPNS accesskey
  79. MI_APPID : "",//小米 AppID
  80. MI_APPKEY : "",//小米 AppKey
  81. VIVO_APPID : "",// vivo AppID
  82. VIVO_APPKEY : "",// vivo AppKey
  83. OPPO_APPID : "",// oppo AppID
  84. OPPO_APPKEY : ""// oppo AppKey
  85. ]
  86. buildConfigField 'String', 'SERVER_URL', '"http://yydsappapi.samsunghook.com"'
  87. // buildConfigField 'String', 'SERVER_URL', '"http://samsunghook.pro"'
  88. }
  89. }
  90. applicationVariants.all { variant ->
  91. variant.outputs.all {
  92. def fileName = productFlavors.name[0] + "_" + productFlavors.versionName[0] + "_" + releaseTime() + ".apk"
  93. outputFileName = fileName
  94. }
  95. }
  96. }
  97. repositories {
  98. flatDir {
  99. dirs 'libs', '../libs'
  100. }
  101. maven {
  102. url "https://mvn.mob.com/android"
  103. }
  104. }
  105. aspectjx {
  106. //排除所有package路径中包含`android.support`的class文件及库(jar文件)
  107. //消除Aspectj对支付宝影响
  108. exclude 'com.alipay', 'com.google'
  109. }
  110. dependencies {
  111. implementation fileTree(include: ['*.jar'], dir: 'libs')
  112. //noinspection GradleCompatible
  113. implementation 'com.android.support:design:23.1.1'
  114. implementation 'androidx.appcompat:appcompat:1.1.0'
  115. testImplementation 'junit:junit:4.12'
  116. androidTestImplementation 'androidx.test:runner:1.2.0'
  117. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  118. implementation project(':KlcVoiceLive')
  119. implementation project(':KlcLive')
  120. implementation project(':KlcUtils')
  121. implementation project(':KlcBase')
  122. implementation project(':KlcBeans')
  123. implementation project(':KlcLive')
  124. implementation project(':KlcLogin')
  125. implementation project(':KlcLoginPage')
  126. implementation project(':KlcTrend')
  127. implementation project(':KlcFans')
  128. implementation project(':KlcMoney')
  129. implementation project(':KlcLiveCommon')
  130. implementation project(':KlcVideoCommon')
  131. implementation project(':KlcCommonView')
  132. implementation project(':KlcMain')
  133. implementation project(':KlcMainPage')
  134. implementation project(':KlcMessage')
  135. implementation project(':KlcImJmessage')
  136. implementation project(':KlcShortVideo')
  137. implementation project(':KlcHomePage')
  138. implementation project(':KlcInvitation')
  139. implementation project(':KlcMe')
  140. implementation project(':KlcPush')
  141. implementation project(':KlcShopping')
  142. annotationProcessor 'com.alibaba:arouter-compiler:1.5.2'
  143. api 'com.alibaba:arouter-api:1.5.2'
  144. }