*
This commit is contained in:
48
core/network/build.gradle.kts
Normal file
48
core/network/build.gradle.kts
Normal file
@@ -0,0 +1,48 @@
|
||||
// core:network 网络框架:鉴权三要素拦截器、统一响应解析、Retrofit/OkHttp 装配
|
||||
// NetworkConfig 的实现由 app 壳提供(配置不进代码库,见 M7-04)
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.hilt)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.stec.cmd.core.network"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 26
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
// NetworkModule 依据 BuildConfig.DEBUG 决定是否装配 BODY 级日志拦截器
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":core:common"))
|
||||
|
||||
// 网络能力对外暴露(业务模块直接声明 Retrofit Service)
|
||||
api(libs.retrofit)
|
||||
api(libs.okhttp)
|
||||
api(libs.kotlinx.serialization.json)
|
||||
implementation(libs.retrofit.converter.kotlinx)
|
||||
implementation(libs.okhttp.logging)
|
||||
|
||||
implementation(libs.hilt.android)
|
||||
ksp(libs.hilt.compiler)
|
||||
|
||||
testImplementation(libs.junit)
|
||||
}
|
||||
Reference in New Issue
Block a user