build.gradle 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. plugins {
  2. alias(libs.plugins.kotlin.android)
  3. id("com.android.library")
  4. }
  5. android {
  6. namespace = "com.narutohuo.xindazhou.socketio"
  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. dependencies {
  20. // 直接依赖 base-core(能力层只需要 base-core 的接口和基础能力)
  21. // base-core 提供接口定义和基础实现(ILog、StorageImpl)
  22. // base-core 会传递 Gson、Coroutines、ILog 等依赖
  23. implementation(project(":base-core"))
  24. // AndroidX Lifecycle(用于 ProcessLifecycleOwner)
  25. implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
  26. implementation("androidx.lifecycle:lifecycle-process:2.7.0")
  27. // SocketIO客户端库
  28. // Maven Central最新版本:2.1.2(Java/Android客户端最高版本)
  29. // netty-socketio 2.0.13 支持 Socket.IO 2.x 客户端
  30. implementation("io.socket:socket.io-client:2.1.2")
  31. // 注意:Gson、Coroutines、ILog 已通过 base-core 传递,无需重复依赖
  32. }