You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
3.9 KiB
118 lines
3.9 KiB
import java.util.Properties
|
|
import java.io.FileInputStream
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("kotlin-android")
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
id("com.google.gms.google-services")version "4.3.13"
|
|
}
|
|
|
|
val keystorePropertiesFile = rootProject.file("app/sign/DeepSound.properties")
|
|
val keystoreProperties =Properties().apply {
|
|
load(FileInputStream(keystorePropertiesFile)) // 使用 Kotlin 扩展方法
|
|
}
|
|
|
|
android {
|
|
namespace = "com.yunqiinnovation.deepsound"
|
|
compileSdk = 35
|
|
ndkVersion = "28.0.13004108"
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
// Enable core library desugaring
|
|
isCoreLibraryDesugaringEnabled = true
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
}
|
|
|
|
// 添加lint选项
|
|
lintOptions {
|
|
isCheckReleaseBuilds = false
|
|
}
|
|
|
|
defaultConfig {
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
applicationId = "com.yunqiinnovation.deepsound"
|
|
// You can update the following values to match your application needs.
|
|
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
|
minSdk = 24 // Updated to meet azure_speech_recognition_null_safety requirements
|
|
targetSdk = 34 // 设置为 Android 13 (API 33),以匹配 FOREGROUND_SERVICE_MEDIA_PLAYBACK 权限的要求
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
storeFile = file(keystoreProperties.getProperty("storeFile"))
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
enableV1Signing = true
|
|
enableV2Signing = true
|
|
}
|
|
getByName("debug") {
|
|
// debug 使用与 release 相同的签名配置
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
storeFile = file(keystoreProperties.getProperty("storeFile"))
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
enableV1Signing = true
|
|
enableV2Signing = true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
// TODO: Add your own signing config for the release build.
|
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
|
isMinifyEnabled = false
|
|
isShrinkResources = false
|
|
signingConfig = signingConfigs.getByName("release")
|
|
// signingConfig = signingConfigs.getByName("debug")
|
|
}
|
|
debug {
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation("io.modelcontextprotocol:kotlin-sdk:0.4.0")
|
|
|
|
|
|
// 添加本地插件模块依赖
|
|
implementation(project(":azure_speech"))
|
|
implementation(project(":open_ai_service"))
|
|
implementation(project(":volcano_speech"))
|
|
// 添加OkHttp依赖
|
|
implementation("com.squareup.okhttp3:okhttp:4.9.3")
|
|
|
|
// 添加核心库反糖化
|
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
|
|
|
|
|
|
// 添加androidx.media依赖
|
|
implementation("androidx.media:media:1.6.0")
|
|
|
|
// 添加legacy-support-v4依赖
|
|
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
|
|
|
// 添加 AndroidX Security 加密 SharedPreferences 依赖
|
|
implementation("androidx.security:security-crypto:1.1.0-alpha06")
|
|
|
|
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|
|
|