build.gradle.kts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 = "com.tiku.tiku_client"
  8. compileSdk = flutter.compileSdkVersion
  9. ndkVersion = flutter.ndkVersion
  10. compileOptions {
  11. sourceCompatibility = JavaVersion.VERSION_17
  12. targetCompatibility = JavaVersion.VERSION_17
  13. }
  14. defaultConfig {
  15. ndk {
  16. abiFilters.clear()
  17. abiFilters.add("arm64-v8a")
  18. }
  19. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  20. applicationId = "com.tiku.tiku_client"
  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. signingConfigs {
  29. create("release") {
  30. val props = rootProject.file("keystore.properties")
  31. if (props.exists()) {
  32. props.reader().use { reader ->
  33. reader.readLines().forEach { line ->
  34. val (k, v) = line.split("=", limit = 2)
  35. when (k.trim()) {
  36. "storeFile" -> storeFile = file(v.trim())
  37. "storePassword" -> storePassword = v.trim()
  38. "keyAlias" -> keyAlias = v.trim()
  39. "keyPassword" -> keyPassword = v.trim()
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. buildTypes {
  47. release {
  48. signingConfig = signingConfigs.getByName("release")
  49. }
  50. }
  51. }
  52. kotlin {
  53. compilerOptions {
  54. jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
  55. }
  56. }
  57. flutter {
  58. source = "../.."
  59. }