build.gradle 1.4 KB

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