build.gradle 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. android {
  22. namespace "com.gnhz.clinic.eitc_erm_app"
  23. compileSdk flutter.compileSdkVersion
  24. ndkVersion flutter.ndkVersion
  25. compileOptions {
  26. sourceCompatibility JavaVersion.VERSION_1_8
  27. targetCompatibility JavaVersion.VERSION_1_8
  28. }
  29. kotlinOptions {
  30. jvmTarget = '1.8'
  31. }
  32. sourceSets {
  33. main.java.srcDirs += 'src/main/kotlin'
  34. }
  35. defaultConfig {
  36. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  37. applicationId "com.gnhz.clinic.eitc_erm_app"
  38. // You can update the following values to match your application needs.
  39. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
  40. minSdkVersion flutter.minSdkVersion
  41. targetSdkVersion flutter.targetSdkVersion
  42. versionCode flutterVersionCode.toInteger()
  43. versionName flutterVersionName
  44. multiDexEnabled true
  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. packagingOptions {
  54. pickFirst "META-INF/library_release.kotlin_module"
  55. }
  56. buildFeatures {
  57. viewBinding true
  58. }
  59. }
  60. flutter {
  61. source '../..'
  62. }
  63. dependencies {
  64. implementation 'com.github.chrisbanes:PhotoView:2.0.0'
  65. implementation 'androidx.appcompat:appcompat:1.4.1'
  66. implementation 'com.google.android.material:material:1.4.0'
  67. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  68. implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
  69. implementation 'org.apache.commons:commons-lang3:3.12.0'
  70. }