settings.gradle 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //pluginManagement {
  2. // def flutterSdkPath = {
  3. // def properties = new Properties()
  4. // file("local.properties").withInputStream { properties.load(it) }
  5. // def flutterSdkPath = properties.getProperty("flutter.sdk")
  6. // assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
  7. // return flutterSdkPath
  8. // }
  9. // settings.ext.flutterSdkPath = flutterSdkPath()
  10. //
  11. // includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
  12. //
  13. // plugins {
  14. // id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
  15. // }
  16. //}
  17. //
  18. //include ":app"
  19. //
  20. //apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
  21. pluginManagement {
  22. def flutterSdkPath = {
  23. def properties = new Properties()
  24. file("local.properties").withInputStream { properties.load(it) }
  25. def flutterSdkPath = properties.getProperty("flutter.sdk")
  26. assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
  27. return flutterSdkPath
  28. }
  29. settings.ext.flutterSdkPath = flutterSdkPath()
  30. includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
  31. repositories {
  32. maven { url 'https://maven.aliyun.com/repository/google' }
  33. maven { url 'https://maven.aliyun.com/repository/public' }
  34. maven { url 'https://maven.aliyun.com/repository/jcenter' }
  35. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  36. google()
  37. mavenCentral()
  38. gradlePluginPortal()
  39. }
  40. }
  41. plugins {
  42. id "dev.flutter.flutter-plugin-loader" version "1.0.0"
  43. id "com.android.application" version "8.1.1" apply false
  44. id "org.jetbrains.kotlin.android" version "1.7.10" apply false
  45. }
  46. include ":app"