build.gradle 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. plugins {
  2. alias(libs.plugins.kotlin.android)
  3. id("com.android.library")
  4. }
  5. android {
  6. namespace = "com.narutohuo.xindazhou.core"
  7. compileSdk = 36
  8. defaultConfig {
  9. minSdk = 26
  10. }
  11. compileOptions {
  12. sourceCompatibility = JavaVersion.VERSION_17
  13. targetCompatibility = JavaVersion.VERSION_17
  14. }
  15. kotlinOptions {
  16. jvmTarget = "17"
  17. }
  18. }
  19. repositories {
  20. flatDir {
  21. dirs 'libs'
  22. }
  23. mavenCentral()
  24. google()
  25. }
  26. dependencies {
  27. // AndroidX Core
  28. api(libs.androidx.core.ktx)
  29. // Retrofit & OkHttp(基础网络库,所有模块都需要)
  30. // 使用 api 传递依赖,让 base-common 和其他模块可以使用
  31. api("com.squareup.retrofit2:retrofit:2.9.0")
  32. api("com.squareup.okhttp3:okhttp:4.12.0")
  33. api("com.squareup.okhttp3:logging-interceptor:4.12.0")
  34. // Gson(JSON解析)
  35. api("com.google.code.gson:gson:2.10.1")
  36. api("com.squareup.retrofit2:converter-gson:2.9.0")
  37. // Glide(图片加载,所有模块都需要)
  38. api("com.github.bumptech.glide:glide:4.16.0")
  39. // Kotlin Coroutines(协程,所有模块都需要)
  40. api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
  41. api("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
  42. // ARouter(路由和依赖注入)
  43. api("com.alibaba:arouter-api:1.5.2")
  44. // XXPermissions(权限请求库,所有模块都需要)
  45. // 使用 api 传递依赖,让 base-common 和其他模块可以使用
  46. api("com.github.getActivity:XXPermissions:18.6")
  47. // 微信 SDK(仅用于 WXEntryActivity 回调 Activity)
  48. api("com.tencent.mm.opensdk:wechat-sdk-android:6.8.24")
  49. // 友盟分享核心库(仅用于 WXEntryActivity 继承 WXCallbackActivity)
  50. // 注意:base-core 只依赖友盟分享核心库,不依赖完整的分享功能
  51. // 完整的分享功能在 capability-share 模块中
  52. api("com.umeng.umsdk:share-core:+")
  53. // 友盟微信分享完整版 JAR(包含 WXCallbackActivity)
  54. // 注意:WXCallbackActivity 在 umeng-share-wechat-full JAR 中
  55. api(files('libs/umeng-share-wechat-full-7.3.7.jar'))
  56. // LogcatViewer - 浮动窗口日志输出(开发调试用)
  57. // 注意:只在开发环境使用,生产环境使用 NoOpLog
  58. implementation("com.github.weijiaxing:LogcatViewer:1.0.3")
  59. }