build.gradle 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. plugins {
  2. id "com.android.application"
  3. id "kotlin-android"
  4. id "dev.flutter.flutter-gradle-plugin"
  5. id "com.google.gms.google-services"
  6. }
  7. def localProperties = new Properties()
  8. def localPropertiesFile = rootProject.file('local.properties')
  9. if (localPropertiesFile.exists()) {
  10. localPropertiesFile.withReader('UTF-8') { reader ->
  11. localProperties.load(reader)
  12. }
  13. }
  14. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  15. if (flutterVersionCode == null) {
  16. flutterVersionCode = '1'
  17. }
  18. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  19. if (flutterVersionName == null) {
  20. flutterVersionName = '1.0'
  21. }
  22. android {
  23. namespace "com.example.putra_go"
  24. compileSdkVersion flutter.compileSdkVersion
  25. ndkVersion flutter.ndkVersion
  26. compileOptions {
  27. sourceCompatibility JavaVersion.VERSION_1_8
  28. targetCompatibility JavaVersion.VERSION_1_8
  29. }
  30. kotlinOptions {
  31. jvmTarget = '1.8'
  32. }
  33. sourceSets {
  34. main.java.srcDirs += 'src/main/kotlin'
  35. }
  36. defaultConfig {
  37. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  38. applicationId "com.example.putra_go"
  39. // You can update the following values to match your application needs.
  40. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
  41. minSdkVersion 21
  42. targetSdkVersion 33
  43. versionCode flutterVersionCode.toInteger()
  44. versionName flutterVersionName
  45. }
  46. buildTypes {
  47. release {
  48. // TODO: Add your own signing config for the release build.
  49. // Signing with the debug keys for now, so `flutter run --release` works.
  50. signingConfig signingConfigs.debug
  51. }
  52. }
  53. }
  54. flutter {
  55. source '../..'
  56. }
  57. dependencies {
  58. implementation(platform("com.google.firebase:firebase-bom:32.7.0"))
  59. }