build.gradle 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. plugins {
  2. id 'com.android.application'
  3. id 'org.jetbrains.kotlin.android'
  4. }
  5. apply plugin: 'kotlin-android-extensions'
  6. apply plugin: 'kotlin-kapt'
  7. kapt {
  8. arguments {
  9. arg("AROUTER_MODULE_NAME", project.getName())
  10. // 是否生成路由文档,"enable":生成文档,其他字符串不生成路由文档
  11. arg("AROUTER_GENERATE_DOC", "enable")
  12. }
  13. }
  14. android {
  15. compileSdkVersion 30
  16. defaultConfig {
  17. applicationId "com.cooleshow.student"
  18. minSdkVersion 21
  19. targetSdkVersion 30
  20. versionCode 110
  21. versionName "1.1.0"
  22. ndk {
  23. abiFilters "armeabi-v7a", "arm64-v8a"
  24. }
  25. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  26. manifestPlaceholders = [
  27. qqappid: "1110018403",
  28. JPUSH_PKGNAME: applicationId,
  29. JPUSH_APPKEY : "911d07f359c18a078f29792f", //JPush 上注册的包名对应的 Appkey.
  30. JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
  31. XIAOMI_APPID : "MI-2882303761520172242",
  32. XIAOMI_APPKEY : "MI-5692017221242",
  33. OPPO_APPKEY : "OP-5b2b716e774c45f2bd9a90b242b295e9",
  34. OPPO_APPID : "OP-30841111",
  35. OPPO_APPSECRET : "OP-3f1d849d8bce4273be48ca08a2ce320b",
  36. VIVO_APPKEY : "ebf526d1d61ab3bba65ce30d333189f3",
  37. VIVO_APPID : "105573871",
  38. ]
  39. }
  40. signingConfigs {
  41. release {
  42. v1SigningEnabled true
  43. v2SigningEnabled true
  44. storeFile file("../cooleshow.jks")
  45. //签名文件
  46. storePassword "cooleshow"
  47. keyAlias "cooleshow"
  48. keyPassword "cooleshow" //签名密码
  49. }
  50. }
  51. buildTypes {
  52. release {
  53. minifyEnabled false
  54. signingConfig signingConfigs.release
  55. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  56. buildConfigField "String", "BASE_H5_URL", RELEASE_BASE_URL_H5
  57. }
  58. debug {
  59. minifyEnabled false
  60. signingConfig signingConfigs.release
  61. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  62. buildConfigField "String", "BASE_H5_URL", TEST_BASE_URL_H5
  63. }
  64. }
  65. compileOptions {
  66. sourceCompatibility JavaVersion.VERSION_1_8
  67. targetCompatibility JavaVersion.VERSION_1_8
  68. }
  69. packagingOptions {
  70. exclude 'META-INF/library_release.kotlin_module'
  71. }
  72. kotlinOptions {
  73. jvmTarget = '1.8'
  74. }
  75. buildFeatures {
  76. viewBinding = true
  77. }
  78. repositories {
  79. flatDir {
  80. dirs 'libs'
  81. }
  82. }
  83. }
  84. dependencies {
  85. api fileTree(dir: 'libs', include: ['*.jar'])
  86. implementation 'androidx.core:core-ktx:1.6.0'
  87. implementation 'androidx.appcompat:appcompat:1.3.0'
  88. implementation 'com.google.android.material:material:1.4.0'
  89. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  90. testImplementation 'junit:junit:4.13.2'
  91. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  92. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  93. implementation project(path: ':BaseLibrary')
  94. api project(path: ':usercenter')
  95. implementation project(path: ':rong_im:kit')
  96. implementation project(path: ':rong_im:common_im_ui')
  97. implementation project(path: ':live_teaching')
  98. implementation "com.alibaba:arouter-api:$rootProject.ext.android.arouter_api_version"
  99. kapt "com.alibaba:arouter-compiler:$rootProject.ext.android.arouter_api_version"
  100. // api(name: 'openDefault-10.10.0', ext: 'aar')
  101. // 极光推送start
  102. implementation 'cn.jiguang.sdk:jpush:4.7.2' // 此处以JPush 4.7.0 版本为例。
  103. implementation 'cn.jiguang.sdk:jcore:3.2.4' // 此处以JCore 3.2.4 版本为例。
  104. //若不集成厂商通道,可直接跳过以下依赖
  105. // 接入华为厂商
  106. implementation 'com.huawei.hms:push:6.3.0.304'
  107. // 极光厂商插件版本与接入 JPush 版本保持一致,下同
  108. implementation 'cn.jiguang.sdk.plugin:huawei:4.7.2'
  109. // 接入 VIVO 厂商
  110. implementation 'cn.jiguang.sdk.plugin:vivo:4.7.2'
  111. // 接入小米厂商
  112. implementation 'cn.jiguang.sdk.plugin:xiaomi:4.7.2'
  113. // 接入 OPPO 厂商
  114. implementation 'cn.jiguang.sdk.plugin:oppo:4.7.2'
  115. // JPush Android SDK v4.6.0 开始,需要单独引入 oppo 厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/oppo/libs 下的 com.heytap.msp-push-x.x.x.aar 文件单独拷贝一份到应用 module/libs 下
  116. implementation(name: 'com.heytap.msp-push-3.0.0', ext: 'aar')
  117. implementation 'commons-codec:commons-codec:1.6'
  118. // 极光推送end
  119. }