64 lines
1.5 KiB
Groovy
64 lines
1.5 KiB
Groovy
plugins {
|
|
alias(libs.plugins.android.application)
|
|
id 'dagger.hilt.android.plugin'
|
|
}
|
|
|
|
android {
|
|
namespace 'com.example.demo'
|
|
compileSdk 34
|
|
|
|
defaultConfig {
|
|
applicationId "com.example.demo"
|
|
minSdk 26
|
|
targetSdk 34
|
|
versionCode 1
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// 基础Android库
|
|
implementation libs.appcompat
|
|
implementation libs.material
|
|
|
|
// 生命周期和ViewModel
|
|
implementation libs.lifecycle.viewmodel
|
|
implementation libs.lifecycle.livedata
|
|
|
|
// Room数据库
|
|
implementation libs.room.runtime
|
|
annotationProcessor libs.room.compiler
|
|
|
|
// 网络库
|
|
implementation libs.retrofit
|
|
implementation libs.retrofit.gson
|
|
implementation libs.okhttp.logging
|
|
|
|
// 依赖注入
|
|
implementation libs.hilt.android
|
|
annotationProcessor libs.hilt.compiler
|
|
|
|
// 工作管理器
|
|
implementation libs.work.runtime
|
|
|
|
// 蓝牙库
|
|
implementation libs.ble
|
|
|
|
// 测试库
|
|
testImplementation libs.junit
|
|
androidTestImplementation libs.ext.junit
|
|
androidTestImplementation libs.espresso.core
|
|
} |