build.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. // base-core 不再需要访问 capability-share/libs 目录
  21. // 友盟相关依赖由 capability-share 模块管理
  22. }
  23. dependencies {
  24. // AndroidX Core
  25. api(libs.androidx.core.ktx)
  26. // Timber for logging (默认日志实现)
  27. // 如果以后不用 Timber,只需修改 TimberLog 实现类
  28. api("com.jakewharton.timber:timber:5.0.1")
  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. // 微信 SDK(仅用于 WXEntryActivity 回调 Activity)
  45. // 注意:base-core 只依赖微信官方 SDK,不依赖友盟
  46. // 友盟相关依赖应该在 capability-share 模块中
  47. api("com.tencent.mm.opensdk:wechat-sdk-android:6.8.24")
  48. }