plugins { alias(libs.plugins.kotlin.android) id("com.android.library") } android { namespace = "com.narutohuo.xindazhou.core" compileSdk = 36 defaultConfig { minSdk = 26 } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" } } repositories { flatDir { dirs '../capability-share/libs' } } dependencies { // AndroidX Core api(libs.androidx.core.ktx) // Timber for logging (默认日志实现) // 如果以后不用 Timber,只需修改 TimberLog 实现类 api("com.jakewharton.timber:timber:5.0.1") // Retrofit & OkHttp(基础网络库,所有模块都需要) // 使用 api 传递依赖,让 base-common 和其他模块可以使用 api("com.squareup.retrofit2:retrofit:2.9.0") api("com.squareup.okhttp3:okhttp:4.12.0") api("com.squareup.okhttp3:logging-interceptor:4.12.0") // Fastjson2(JSON解析,替代 Gson) // 注意:Fastjson2 需要 Java 8+ // Maven Central: https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2 api("com.alibaba.fastjson2:fastjson2:2.0.47") // Glide(图片加载,所有模块都需要) api("com.github.bumptech.glide:glide:4.16.0") // Kotlin Coroutines(协程,所有模块都需要) api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3") api("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") // ARouter(路由和依赖注入) api("com.alibaba:arouter-api:1.5.2") // 友盟分享 SDK(仅用于 WXEntryActivity 等回调 Activity) // 注意:虽然 base-core 是基础设施层,但为了支持第三方回调 Activity,需要添加此依赖 // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库) api("com.umeng.umsdk:common:+") // 必选 api("com.umeng.umsdk:asms:+") // 必选 // 分享核心库(必选) api("com.umeng.umsdk:share-core:+") // 微信分享(完整版) // 注意:友盟微信分享 JAR 文件在 share 模块的 libs 目录 // 通过 flatDir 仓库访问 api(files('../capability-share/libs/umeng-share-wechat-full-7.3.7.jar')) api("com.tencent.mm.opensdk:wechat-sdk-android:6.8.24") }