build.gradle 2.5 KB

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