76 lines
2.4 KiB
Kotlin
76 lines
2.4 KiB
Kotlin
plugins {
|
||
alias(libs.plugins.android.application)
|
||
}
|
||
|
||
android {
|
||
namespace = "com.example.defenseapplication"
|
||
compileSdk {
|
||
version = release(36) {
|
||
minorApiLevel = 1
|
||
}
|
||
}
|
||
|
||
defaultConfig {
|
||
applicationId = "com.example.defenseapplication"
|
||
minSdk = 24
|
||
targetSdk = 36
|
||
versionCode = 1
|
||
versionName = "1.0"
|
||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
isMinifyEnabled = false
|
||
proguardFiles(
|
||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||
"proguard-rules.pro"
|
||
)
|
||
}
|
||
}
|
||
compileOptions {
|
||
sourceCompatibility = JavaVersion.VERSION_11
|
||
targetCompatibility = JavaVersion.VERSION_11
|
||
}
|
||
buildFeatures {
|
||
viewBinding=true
|
||
}
|
||
|
||
}
|
||
|
||
dependencies {
|
||
implementation(libs.androidx.core.ktx)
|
||
implementation(libs.androidx.appcompat)
|
||
implementation(libs.material)
|
||
implementation(libs.androidx.activity)
|
||
implementation(libs.androidx.constraintlayout)
|
||
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
||
implementation(libs.firebase.crashlytics.buildtools)
|
||
testImplementation(libs.junit)
|
||
androidTestImplementation(libs.androidx.junit)
|
||
androidTestImplementation(libs.androidx.espresso.core)
|
||
// Retrofit
|
||
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||
// Gson 转换器
|
||
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
||
// OkHttp(Retrofit 会自动依赖 OkHttp,但显式指定版本也可以)
|
||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||
// OkHttp 日志拦截器
|
||
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
||
implementation("com.blankj:utilcodex:1.31.1")
|
||
|
||
// Kotlin 协程
|
||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
||
|
||
// CameraX 用于相机预览
|
||
implementation("androidx.camera:camera-camera2:1.3.0")
|
||
implementation("androidx.camera:camera-lifecycle:1.3.0")
|
||
implementation("androidx.camera:camera-view:1.3.0")
|
||
// Google ML Kit 人脸检测
|
||
implementation("com.google.mlkit:face-detection:16.1.5")
|
||
// 图形绘制库(绘制人脸框)
|
||
implementation("com.github.bumptech.glide:glide:4.15.1")
|
||
//Glide 依赖
|
||
implementation("com.github.bumptech.glide:glide:4.16.0")
|
||
} |