54 lines
1.5 KiB
Groovy
54 lines
1.5 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
id 'com.google.devtools.ksp' // 添加这一行
|
|
}
|
|
|
|
android {
|
|
compileSdk 35
|
|
namespace 'com.xingen.camera'
|
|
defaultConfig {
|
|
applicationId "com.xingen.camera"
|
|
minSdkVersion 24
|
|
targetSdkVersion 35
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
}
|
|
viewBinding {
|
|
//使用viewBinding
|
|
enabled = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation 'androidx.appcompat:appcompat:1.7.1'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation 'androidx.annotation:annotation:1.9.1'
|
|
// lifecycle viewmodel 协程扩展库
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
|
|
|
|
//CameraX
|
|
implementation 'androidx.camera:camera-camera2:1.4.1'
|
|
implementation 'androidx.camera:camera-lifecycle:1.4.0'
|
|
implementation 'androidx.camera:camera-view:1.4.0'
|
|
//图片异步加载Glide
|
|
implementation'com.github.bumptech.glide:glide:4.14.2'
|
|
ksp 'com.github.bumptech.glide:ksp:4.14.2'
|
|
}
|