build.gradle.kts 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. // id "com.google.gms.google-services"
  7. // }
  8. // def keystoreProperties = new Properties()
  9. // def keystorePropertiesFile = rootProject.file('key.properties')
  10. // if (keystorePropertiesFile.exists()) {
  11. // keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  12. // }
  13. // android {
  14. // namespace = "com.datacomsolusindo.telnow2.telnow_mobile2"
  15. // compileSdk = flutter.compileSdkVersion
  16. // ndkVersion = flutter.ndkVersion
  17. // compileOptions {
  18. // coreLibraryDesugaringEnabled true
  19. // sourceCompatibility = JavaVersion.VERSION_1_8
  20. // targetCompatibility = JavaVersion.VERSION_1_8
  21. // }
  22. // kotlinOptions {
  23. // jvmTarget = JavaVersion.VERSION_1_8
  24. // }
  25. // defaultConfig {
  26. // // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  27. // applicationId = "com.datacomsolusindo.telnow2.telnow_mobile2"
  28. // // You can update the following values to match your application needs.
  29. // // For more information, see: https://flutter.dev/to/review-gradle-config.
  30. // minSdk = 23
  31. // targetSdk = flutter.targetSdkVersion
  32. // versionCode = flutter.versionCode
  33. // versionName = flutter.versionName
  34. // ndkVersion "25.1.8937393"
  35. // }
  36. // signingConfigs {
  37. // release {
  38. // keyAlias keystoreProperties['keyAlias']
  39. // keyPassword keystoreProperties['keyPassword']
  40. // storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
  41. // storePassword keystoreProperties['storePassword']
  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.release
  49. // }
  50. // }
  51. // }
  52. // flutter {
  53. // source = "../.."
  54. // }
  55. // dependencies{
  56. // coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
  57. // implementation('com.google.firebase:firebase-auth') {
  58. // exclude module: "play-services-safetynet"
  59. // }
  60. // }
  61. import java.util.Properties
  62. import java.io.FileInputStream
  63. val keystoreProperties = Properties()
  64. val keystorePropertiesFile = rootProject.file("key.properties")
  65. if (keystorePropertiesFile.exists()) {
  66. keystoreProperties.load(FileInputStream(keystorePropertiesFile))
  67. }
  68. plugins {
  69. id("com.android.application")
  70. // START: FlutterFire Configuration
  71. id("com.google.gms.google-services")
  72. // END: FlutterFire Configuration
  73. id("kotlin-android")
  74. // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
  75. id("dev.flutter.flutter-gradle-plugin")
  76. }
  77. android {
  78. namespace = "com.datacomsolusindo.telnow2.telnow_mobile2"
  79. compileSdk = flutter.compileSdkVersion
  80. ndkVersion = "27.0.12077973" //flutter.ndkVersion
  81. compileOptions {
  82. isCoreLibraryDesugaringEnabled = true
  83. sourceCompatibility = JavaVersion.VERSION_11
  84. targetCompatibility = JavaVersion.VERSION_11
  85. }
  86. kotlinOptions {
  87. jvmTarget = JavaVersion.VERSION_11.toString()
  88. }
  89. defaultConfig {
  90. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  91. applicationId = "com.datacomsolusindo.telnow2.telnow_mobile2"
  92. // You can update the following values to match your application needs.
  93. // For more information, see: https://flutter.dev/to/review-gradle-config.
  94. minSdk = 23//flutter.minSdkVersion
  95. targetSdk = flutter.targetSdkVersion
  96. versionCode = flutter.versionCode
  97. versionName = flutter.versionName
  98. }
  99. signingConfigs {
  100. create("release") {
  101. keyAlias = keystoreProperties["keyAlias"] as String
  102. keyPassword = keystoreProperties["keyPassword"] as String
  103. storeFile = keystoreProperties["storeFile"]?.let { file(it) }
  104. storePassword = keystoreProperties["storePassword"] as String
  105. }
  106. }
  107. buildTypes {
  108. release {
  109. // TODO: Add your own signing config for the release build.
  110. // Signing with the debug keys for now, so `flutter run --release` works.
  111. // signingConfig = signingConfigs.getByName("debug")
  112. signingConfig = signingConfigs.getByName("release")
  113. }
  114. }
  115. }
  116. dependencies {
  117. // For AGP 7.4+
  118. coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
  119. // For AGP 7.3
  120. // coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.3")
  121. // For AGP 4.0 to 7.2
  122. // coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.9")
  123. }
  124. flutter {
  125. source = "../.."
  126. }