build.gradle.kts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. plugins {
  2. id("com.android.application")
  3. id("kotlin-android")
  4. // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
  5. id("dev.flutter.flutter-gradle-plugin")
  6. }
  7. android {
  8. namespace = "com.sinoMedCloud.cn.sino_med_cloud"
  9. compileSdk = flutter.compileSdkVersion
  10. ndkVersion = flutter.ndkVersion
  11. compileOptions {
  12. sourceCompatibility = JavaVersion.VERSION_17
  13. targetCompatibility = JavaVersion.VERSION_17
  14. }
  15. // 抑制 Java 版本过时警告(来自依赖库)
  16. tasks.withType<JavaCompile> {
  17. options.compilerArgs.add("-Xlint:-options")
  18. }
  19. kotlinOptions {
  20. jvmTarget = JavaVersion.VERSION_17.toString()
  21. }
  22. defaultConfig {
  23. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  24. applicationId = "com.sinoMedCloud.cn.sino_med_cloud"
  25. // You can update the following values to match your application needs.
  26. // For more information, see: https://flutter.dev/to/review-gradle-config.
  27. minSdk = flutter.minSdkVersion
  28. targetSdk = flutter.targetSdkVersion
  29. versionCode = flutter.versionCode
  30. versionName = flutter.versionName
  31. // JPush 配置占位符
  32. // TODO: 请替换为实际的 JPush AppKey 和 Channel
  33. manifestPlaceholders["JPUSH_APPKEY"] = "your_jpush_appkey_here"
  34. manifestPlaceholders["JPUSH_CHANNEL"] = "developer-default"
  35. }
  36. buildTypes {
  37. release {
  38. // TODO: Add your own signing config for the release build.
  39. // Signing with the debug keys for now, so `flutter run --release` works.
  40. signingConfig = signingConfigs.getByName("debug")
  41. }
  42. }
  43. lint {
  44. checkReleaseBuilds = false
  45. abortOnError = false
  46. }
  47. }
  48. flutter {
  49. source = "../.."
  50. }