build.gradle.kts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. }
  28. sourceSets {
  29. getByName("main") {
  30. jniLibs.srcDirs("libs")
  31. }
  32. }
  33. packaging {
  34. jniLibs {
  35. useLegacyPackaging = true
  36. keepDebugSymbols += "**/*.so"
  37. }
  38. resources {
  39. excludes += ":META-INF/LICENSE"
  40. excludes += ":META-INF/LICENSE.md"
  41. excludes += ":META-INF/NOTICE"
  42. }
  43. }
  44. buildTypes {
  45. release {
  46. // TODO: Add your own signing config for the release build.
  47. // Signing with the debug keys for now, so `flutter run --release` works.
  48. signingConfig = signingConfigs.getByName("debug")
  49. }
  50. }
  51. }
  52. flutter {
  53. source = "../.."
  54. }
  55. dependencies {
  56. // Core Libraries
  57. implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar", "*.jar"))))
  58. implementation("com.google.code.gson:gson:2.13.2")
  59. }