build.gradle.kts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. plugins {
  2. id("com.android.application")
  3. // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
  4. id("dev.flutter.flutter-gradle-plugin")
  5. }
  6. android {
  7. namespace = "io.github.jianboy.flutter_paydemo"
  8. compileSdk = flutter.compileSdkVersion
  9. ndkVersion = "27.0.12077973"
  10. compileOptions {
  11. sourceCompatibility = JavaVersion.VERSION_17
  12. targetCompatibility = JavaVersion.VERSION_17
  13. }
  14. defaultConfig {
  15. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  16. applicationId = "io.github.jianboy.flutter_paydemo"
  17. // You can update the following values to match your application needs.
  18. // For more information, see: https://flutter.dev/to/review-gradle-config.
  19. minSdk = flutter.minSdkVersion
  20. targetSdk = flutter.targetSdkVersion
  21. // Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION
  22. // is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions)
  23. // You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true`
  24. // flag during build.
  25. versionCode = flutter.versionCode
  26. versionName = flutter.versionName
  27. }
  28. buildTypes {
  29. release {
  30. // TODO: Add your own signing config for the release build.
  31. // Signing with the debug keys for now, so `flutter run --release` works.
  32. signingConfig = signingConfigs.getByName("debug")
  33. // 临时禁用 lint 以绕过依赖问题
  34. isMinifyEnabled = false
  35. isShrinkResources = false
  36. }
  37. }
  38. // 禁用 lint 任务
  39. lint {
  40. checkReleaseBuilds = false
  41. abortOnError = false
  42. }
  43. }
  44. kotlin {
  45. compilerOptions {
  46. jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
  47. }
  48. }
  49. flutter {
  50. source = "../.."
  51. }