build.gradle 1.7 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 "ru.yoomoney.yookassa_payments_flutter_example"
  23. compileSdkVersion 34
  24. compileOptions {
  25. sourceCompatibility JavaVersion.VERSION_17
  26. targetCompatibility JavaVersion.VERSION_17
  27. }
  28. kotlinOptions {
  29. jvmTarget = '17'
  30. }
  31. sourceSets {
  32. main.java.srcDirs += 'src/main/kotlin'
  33. }
  34. defaultConfig {
  35. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  36. applicationId "ru.yoomoney.yookassa_payments_flutter_example"
  37. minSdkVersion 24
  38. targetSdkVersion 34
  39. versionCode flutterVersionCode.toInteger()
  40. versionName flutterVersionName
  41. resValue "string", "ym_app_scheme", "yookassapaymentsexample"
  42. }
  43. buildTypes {
  44. release {
  45. // TODO: Add your own signing config for the release build.
  46. // Signing with the debug keys for now, so `flutter run --release` works.
  47. signingConfig signingConfigs.debug
  48. }
  49. }
  50. }
  51. flutter {
  52. source '../..'
  53. }