build.gradle 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 "me.yoqi.flutter.flutter_cocktail"
  23. compileSdkVersion 33
  24. ndkVersion flutter.ndkVersion
  25. compileOptions {
  26. sourceCompatibility JavaVersion.VERSION_1_8
  27. targetCompatibility JavaVersion.VERSION_1_8
  28. }
  29. defaultConfig {
  30. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  31. applicationId "me.yoqi.flutter.flutter_cocktail"
  32. // You can update the following values to match your application needs.
  33. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
  34. minSdkVersion flutter.minSdkVersion
  35. targetSdkVersion flutter.targetSdkVersion
  36. versionCode flutterVersionCode.toInteger()
  37. versionName flutterVersionName
  38. }
  39. buildTypes {
  40. release {
  41. // TODO: Add your own signing config for the release build.
  42. // Signing with the debug keys for now, so `flutter run --release` works.
  43. signingConfig signingConfigs.debug
  44. }
  45. }
  46. }
  47. flutter {
  48. source '../..'
  49. }