b353a3de06
Co-Authored-By: Claude Code <noreply@anthropic.com>
63 lines
2.2 KiB
Kotlin
63 lines
2.2 KiB
Kotlin
plugins {
|
||
id("com.android.application")
|
||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||
id("dev.flutter.flutter-gradle-plugin")
|
||
}
|
||
|
||
android {
|
||
namespace = "com.photolive.photo_live"
|
||
compileSdk = flutter.compileSdkVersion
|
||
ndkVersion = flutter.ndkVersion
|
||
|
||
compileOptions {
|
||
sourceCompatibility = JavaVersion.VERSION_17
|
||
targetCompatibility = JavaVersion.VERSION_17
|
||
}
|
||
|
||
defaultConfig {
|
||
applicationId = "com.photolive.photo_live"
|
||
// P3 约定:minSdk 24(Flutter 默认下限);targetSdk 36(Android 16)。
|
||
// Task 7 原生桥接:targetSdk>=34 走 WorkManager expedited + dataSync 前台服务;
|
||
// 若需降级(厂商兼容),路径 = 普通 WorkManager + 前台服务通知(见技术方案 §6.3)。
|
||
minSdk = 24
|
||
targetSdk = 36
|
||
versionCode = flutter.versionCode
|
||
versionName = flutter.versionName
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
// TODO: Add your own signing config for the release build.
|
||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||
signingConfig = signingConfigs.getByName("debug")
|
||
// R8 混淆会破坏 WorkManager 反射初始化(NoSuchMethodException
|
||
// WorkDatabase_Impl),ProGuard keep 规则见 proguard-rules.pro。
|
||
isMinifyEnabled = true
|
||
proguardFiles(
|
||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||
"proguard-rules.pro"
|
||
)
|
||
}
|
||
}
|
||
}
|
||
|
||
kotlin {
|
||
compilerOptions {
|
||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
// P3 Task 7 后台上传桥接:WorkManager(expedited + dataSync 前台服务)
|
||
// + OkHttp 直传 presign PUT(独立 4.12,与 Flutter 引擎无耦合)。
|
||
implementation("androidx.work:work-runtime-ktx:2.10.0")
|
||
implementation("androidx.core:core-ktx:1.15.0")
|
||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||
testImplementation("junit:junit:4.13.2")
|
||
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
|
||
}
|
||
|
||
flutter {
|
||
source = "../.."
|
||
}
|