build.gradle.kts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 = "app.xixi.nomo"
  9. compileSdk = flutter.compileSdkVersion
  10. ndkVersion = flutter.ndkVersion
  11. compileOptions {
  12. sourceCompatibility = JavaVersion.VERSION_11
  13. targetCompatibility = JavaVersion.VERSION_11
  14. }
  15. kotlinOptions {
  16. jvmTarget = JavaVersion.VERSION_11.toString()
  17. }
  18. defaultConfig {
  19. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  20. applicationId = "app.xixi.nomo"
  21. // You can update the following values to match your application needs.
  22. // For more information, see: https://flutter.dev/to/review-gradle-config.
  23. minSdk = flutter.minSdkVersion
  24. targetSdk = flutter.targetSdkVersion
  25. versionCode = flutter.versionCode
  26. versionName = flutter.versionName
  27. ndk {
  28. abiFilters.add("armeabi-v7a")
  29. abiFilters.add("arm64-v8a")
  30. }
  31. }
  32. sourceSets {
  33. getByName("main") {
  34. jniLibs.srcDirs("libs")
  35. }
  36. }
  37. packaging {
  38. jniLibs {
  39. useLegacyPackaging = true
  40. keepDebugSymbols += "**/*.so"
  41. }
  42. resources {
  43. excludes += ":META-INF/LICENSE"
  44. excludes += ":META-INF/LICENSE.md"
  45. excludes += ":META-INF/NOTICE"
  46. }
  47. }
  48. buildTypes {
  49. release {
  50. // TODO: Add your own signing config for the release build.
  51. // Signing with the debug keys for now, so `flutter run --release` works.
  52. signingConfig = signingConfigs.getByName("debug")
  53. }
  54. }
  55. }
  56. flutter {
  57. source = "../.."
  58. }
  59. dependencies {
  60. // Core Libraries
  61. implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar", "*.jar"))))
  62. implementation("com.google.code.gson:gson:2.13.2")
  63. }