build.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.web_package"
  23. compileSdkVersion 33
  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.example.web_package"
  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 33
  42. versionCode flutterVersionCode.toInteger()
  43. versionName flutterVersionName
  44. }
  45. buildTypes {
  46. release {
  47. // TODO: Add your own signing config for the release build.
  48. // Signing with the debug keys for now, so `flutter run --release` works.
  49. signingConfig signingConfigs.debug
  50. }
  51. }
  52. }
  53. flutter {
  54. source '../..'
  55. }
  56. dependencies {}