build.gradle 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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" // Google Services plugin
  6. id "com.google.firebase.crashlytics"
  7. }
  8. def localProperties = new Properties()
  9. def localPropertiesFile = rootProject.file('local.properties')
  10. if (localPropertiesFile.exists()) {
  11. localPropertiesFile.withReader('UTF-8') { reader ->
  12. localProperties.load(reader)
  13. }
  14. }
  15. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  16. if (flutterVersionCode == null) {
  17. flutterVersionCode = '1'
  18. }
  19. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  20. if (flutterVersionName == null) {
  21. flutterVersionName = '1.0'
  22. }
  23. def keystoreProperties = new Properties()
  24. def keystorePropertiesFile = rootProject.file('key.properties')
  25. if (keystorePropertiesFile.exists()) {
  26. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  27. }
  28. android {
  29. namespace "com.uitgaanskrant.app"
  30. compileSdkVersion 36
  31. ndkVersion "28.2.13676358"
  32. compileOptions {
  33. coreLibraryDesugaringEnabled true
  34. sourceCompatibility JavaVersion.VERSION_1_8
  35. targetCompatibility JavaVersion.VERSION_1_8
  36. }
  37. kotlinOptions {
  38. jvmTarget = JavaVersion.VERSION_1_8
  39. }
  40. sourceSets {
  41. main.java.srcDirs += 'src/main/kotlin'
  42. }
  43. lintOptions {
  44. disable 'InvalidPackage'
  45. checkReleaseBuilds false
  46. }
  47. defaultConfig {
  48. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  49. applicationId "com.uitgaanskrant.app"
  50. minSdkVersion flutter.minSdkVersion
  51. targetSdkVersion 36
  52. versionCode flutterVersionCode.toInteger()
  53. versionName flutterVersionName
  54. }
  55. signingConfigs {
  56. release {
  57. keyAlias keystoreProperties['keyAlias']
  58. keyPassword keystoreProperties['keyPassword']
  59. storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
  60. storePassword keystoreProperties['storePassword']
  61. }
  62. }
  63. buildTypes {
  64. release {
  65. // TODO: Add your own signing config for the release build.
  66. // Signing with the debug keys for now, so `flutter run --release` works.
  67. signingConfig signingConfigs.debug
  68. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  69. }
  70. }
  71. }
  72. flutter {
  73. source '../..'
  74. }
  75. dependencies {
  76. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
  77. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.0"
  78. }