settings.gradle 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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. includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
  10. repositories {
  11. maven { url 'https://maven.aliyun.com/repository/google' }
  12. maven { url 'https://maven.aliyun.com/repository/central' }
  13. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  14. maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
  15. maven { url 'https://jitpack.io' }
  16. google()
  17. mavenCentral()
  18. gradlePluginPortal()
  19. }
  20. }
  21. plugins {
  22. id "dev.flutter.flutter-plugin-loader" version "1.0.0"
  23. id "com.android.application" version "8.7.3" apply false
  24. id "org.jetbrains.kotlin.android" version "1.9.0" apply false
  25. // 添加 Google Services 插件
  26. id "com.google.gms.google-services" version "4.4.0" apply false
  27. }
  28. include ":app"