build.gradle 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. /*
  3. * 仓库顺序(2026-11-23 加镜像)
  4. *
  5. * google() / mavenCentral() 在国内机器上经常几十 KB/s,
  6. * 首次构建光下载 AGP + 依赖就要一小时。
  7. * 把阿里云镜像放前面,官方源留作兜底 —— 镜像缺包时自动回落到官方,
  8. * 不会因为镜像不全而构建失败。
  9. */
  10. buildscript {
  11. repositories {
  12. maven { url 'https://maven.aliyun.com/repository/google' }
  13. maven { url 'https://maven.aliyun.com/repository/public' }
  14. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  15. google()
  16. mavenCentral()
  17. }
  18. dependencies {
  19. classpath 'com.android.tools.build:gradle:8.13.0'
  20. classpath 'com.google.gms:google-services:4.4.4'
  21. // NOTE: Do not place your application dependencies here; they belong
  22. // in the individual module build.gradle files
  23. }
  24. }
  25. apply from: "variables.gradle"
  26. allprojects {
  27. repositories {
  28. maven { url 'https://maven.aliyun.com/repository/google' }
  29. maven { url 'https://maven.aliyun.com/repository/public' }
  30. google()
  31. mavenCentral()
  32. }
  33. }
  34. task clean(type: Delete) {
  35. delete rootProject.buildDir
  36. }