build.gradle 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. def localProperties = new Properties()
  2. def localPropertiesFile = rootProject.file('local.properties')
  3. if (localPropertiesFile.exists()) {
  4. localPropertiesFile.withReader('UTF-8') { reader ->
  5. localProperties.load(reader)
  6. }
  7. }
  8. def flutterRoot = localProperties.getProperty('flutter.sdk')
  9. if (flutterRoot == null) {
  10. throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  11. }
  12. apply plugin: 'com.android.application'
  13. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  14. def keystorePropertiesFile = rootProject.file("key.properties")
  15. def keystoreProperties = new Properties()
  16. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  17. android {
  18. compileSdkVersion 33
  19. lintOptions {
  20. disable 'InvalidPackage'
  21. }
  22. defaultConfig {
  23. applicationId "com.yubo.flutterosc"
  24. minSdkVersion 21
  25. targetSdkVersion 33
  26. versionCode 10002
  27. versionName "1.2.1"
  28. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  29. }
  30. signingConfigs {
  31. release {
  32. keyAlias keystoreProperties['keyAlias']
  33. keyPassword keystoreProperties['keyPassword']
  34. storeFile file(keystoreProperties['storeFile'])
  35. storePassword keystoreProperties['storePassword']
  36. }
  37. }
  38. buildTypes {
  39. release {
  40. signingConfig signingConfigs.release
  41. }
  42. }
  43. }
  44. flutter {
  45. source '../..'
  46. }