build.gradle 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.example.sis_flutter"
  23. compileSdkVersion 34
  24. defaultConfig {
  25. applicationId "com.example.sis_flutter"
  26. minSdkVersion 27
  27. targetSdkVersion 34
  28. versionCode flutterVersionCode.toInteger()
  29. versionName flutterVersionName
  30. ndkVersion flutter.ndkVersion
  31. }
  32. ndkVersion = "26.1.10909125"
  33. compileOptions {
  34. sourceCompatibility JavaVersion.VERSION_1_8
  35. targetCompatibility JavaVersion.VERSION_1_8
  36. }
  37. kotlinOptions {
  38. jvmTarget = '1.8'
  39. }
  40. sourceSets {
  41. main.java.srcDirs += 'src/main/kotlin'
  42. }
  43. buildTypes {
  44. release {
  45. signingConfig signingConfigs.debug
  46. }
  47. }
  48. }
  49. flutter {
  50. source '../..'
  51. }
  52. dependencies {
  53. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  54. }