76 lines
2.4 KiB
Groovy
76 lines
2.4 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
}
|
|
|
|
android {
|
|
namespace 'com.digitalperson'
|
|
compileSdk 33
|
|
|
|
buildFeatures {
|
|
buildConfig true
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path "src/main/cpp/CMakeLists.txt"
|
|
}
|
|
}
|
|
|
|
// 与 school_teacher 一致:调试构建下可避免某些设备/系统对 jniLibs 打包的校验问题
|
|
packagingOptions {
|
|
jniLibs {
|
|
useLegacyPackaging = true
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.digitalperson"
|
|
minSdk 21
|
|
targetSdk 33
|
|
versionCode 1
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
// Read from gradle.properties / local.properties:
|
|
// LLM_API_URL=...
|
|
// LLM_API_KEY=...
|
|
// LLM_MODEL=...
|
|
buildConfigField "String", "LLM_API_URL", "\"${(project.findProperty('LLM_API_URL') ?: 'https://ark.cn-beijing.volces.com/api/v3/chat/completions').toString()}\""
|
|
buildConfigField "String", "LLM_API_KEY", "\"${(project.findProperty('LLM_API_KEY') ?: '').toString()}\""
|
|
buildConfigField "String", "LLM_MODEL", "\"${(project.findProperty('LLM_MODEL') ?: 'doubao-1-5-pro-32k-character-250228').toString()}\""
|
|
|
|
ndk {
|
|
abiFilters "arm64-v8a"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled 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'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'androidx.core:core-ktx:1.7.0'
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
implementation 'com.google.android.material:material:1.9.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
// ExoPlayer for video playback (used to show silent / speaking videos)
|
|
implementation 'com.google.android.exoplayer:exoplayer:2.18.6'
|
|
}
|