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.
108 lines
3.4 KiB
108 lines
3.4 KiB
import java.util.Properties
|
|
import java.io.FileInputStream
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven {
|
|
url = uri("https://artifact.bytedance.com/repository/Volcengine/")
|
|
}
|
|
}
|
|
|
|
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()
|
|
}
|
|
|
|
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 = 33 // 设置为 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
|
|
|
|
}
|
|
|
|
}
|
|
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")
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// 添加OkHttp依赖
|
|
implementation("com.squareup.okhttp3:okhttp:4.9.3")
|
|
|
|
// 添加核心库反糖化
|
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
|
|
|
|
// Microsoft 语音识别SDK
|
|
implementation("com.microsoft.cognitiveservices.speech:client-sdk:1.42.0")
|
|
|
|
// 添加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")
|
|
|
|
// // 添加火山语音合成SDK依赖
|
|
// implementation("com.bytedance.speechengine:speechengine_tts_tob:5.4.8")
|
|
|
|
// 添加火山语音识别SDK依赖
|
|
// implementation("com.bytedance.speechengine:speechengine_tob:0.0.5")
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|
|
|