2024-09-17 09:24:50 +08:00
|
|
|
|
plugins {
|
|
|
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
|
|
alias(libs.plugins.kotlin.android)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
|
namespace = "com.example.flomo_ai"
|
|
|
|
|
|
compileSdk = 34
|
|
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
|
applicationId = "com.example.flomo_ai"
|
2026-03-12 20:13:24 +08:00
|
|
|
|
minSdk = 24
|
2024-09-17 09:24:50 +08:00
|
|
|
|
targetSdk = 34
|
2026-03-12 20:13:24 +08:00
|
|
|
|
versionCode = 2
|
|
|
|
|
|
versionName = "1.2"
|
2024-09-17 09:24:50 +08:00
|
|
|
|
|
|
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
|
|
vectorDrawables {
|
|
|
|
|
|
useSupportLibrary = true
|
|
|
|
|
|
}
|
2024-09-29 21:56:55 +08:00
|
|
|
|
|
2026-03-12 20:13:24 +08:00
|
|
|
|
// 启用 View Binding
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
|
viewBinding = true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
|
|
getByName("main") {
|
|
|
|
|
|
java.srcDirs("src/main/java")
|
|
|
|
|
|
res.srcDirs("src/main/res")
|
|
|
|
|
|
manifest.srcFile("src/main/AndroidManifest.xml")
|
|
|
|
|
|
}
|
|
|
|
|
|
getByName("test") {
|
|
|
|
|
|
java.srcDirs("src/test/java")
|
|
|
|
|
|
}
|
|
|
|
|
|
getByName("androidTest") {
|
|
|
|
|
|
java.srcDirs("src/androidTest/java")
|
|
|
|
|
|
}
|
2024-09-17 09:24:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
2026-03-12 20:13:24 +08:00
|
|
|
|
debug {
|
|
|
|
|
|
isDebuggable = true
|
|
|
|
|
|
isMinifyEnabled = false
|
|
|
|
|
|
applicationIdSuffix = ".debug"
|
|
|
|
|
|
}
|
2024-09-17 09:24:50 +08:00
|
|
|
|
release {
|
|
|
|
|
|
isMinifyEnabled = false
|
|
|
|
|
|
proguardFiles(
|
|
|
|
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
|
|
|
|
"proguard-rules.pro"
|
|
|
|
|
|
)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
|
|
}
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
|
|
}
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
|
compose = true
|
|
|
|
|
|
}
|
|
|
|
|
|
composeOptions {
|
|
|
|
|
|
kotlinCompilerExtensionVersion = "1.5.1"
|
|
|
|
|
|
}
|
|
|
|
|
|
packaging {
|
|
|
|
|
|
resources {
|
|
|
|
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
buildToolsVersion = "34.0.0"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
|
implementation(libs.androidx.core.ktx)
|
|
|
|
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
|
|
|
|
implementation(libs.androidx.activity.compose)
|
|
|
|
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
|
|
|
|
implementation(libs.androidx.ui)
|
|
|
|
|
|
implementation(libs.androidx.ui.graphics)
|
|
|
|
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
|
|
|
|
implementation(libs.androidx.material3)
|
|
|
|
|
|
implementation(libs.appcompat)
|
|
|
|
|
|
implementation(libs.material)
|
2026-03-12 20:13:24 +08:00
|
|
|
|
|
|
|
|
|
|
// 网络请求相关
|
|
|
|
|
|
implementation(libs.okhttp)
|
|
|
|
|
|
implementation(libs.logging.interceptor)
|
|
|
|
|
|
|
|
|
|
|
|
// JSON解析
|
|
|
|
|
|
implementation(libs.gson)
|
|
|
|
|
|
implementation(libs.moshi.kotlin)
|
|
|
|
|
|
|
|
|
|
|
|
// 协程支持
|
|
|
|
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
|
|
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
|
|
|
|
|
|
|
|
|
|
// JWT处理
|
|
|
|
|
|
implementation(libs.kjwt.jwks)
|
|
|
|
|
|
implementation(libs.nimbus.jose.jwt)
|
|
|
|
|
|
|
|
|
|
|
|
// 权限处理 (已移除PermissionX,代码中未使用)
|
|
|
|
|
|
|
|
|
|
|
|
// 图片加载
|
|
|
|
|
|
implementation("com.github.bumptech.glide:glide:4.16.0")
|
|
|
|
|
|
annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")
|
|
|
|
|
|
|
|
|
|
|
|
// 测试依赖
|
2024-09-17 09:24:50 +08:00
|
|
|
|
testImplementation(libs.junit)
|
|
|
|
|
|
androidTestImplementation(libs.androidx.junit)
|
|
|
|
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
|
|
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
|
|
|
|
androidTestImplementation(libs.androidx.ui.test.junit4)
|
|
|
|
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
|
|
|
|
debugImplementation(libs.androidx.ui.test.manifest)
|
|
|
|
|
|
}
|