build.gradle 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. maven{ url 'https://maven.aliyun.com/repository/google'} //修改
  5. maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'} //修改
  6. maven{ url 'https://maven.aliyun.com/repository/public'} //修改
  7. maven{ url 'https://maven.aliyun.com/repository/jcenter'} //修改
  8. maven { url "https://jitpack.io" }
  9. jcenter()
  10. google()
  11. mavenCentral()
  12. gradlePluginPortal()
  13. }
  14. apply from: 'config/config.gradle'
  15. ext {
  16. env.kotlin_version = '1.5.10'
  17. }
  18. dependencies {
  19. classpath "com.android.tools.build:gradle:4.1.2"
  20. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${env.kotlin_version}"
  21. // NOTE: Do not place your application dependencies here; they belong
  22. }
  23. }
  24. allprojects {
  25. repositories {
  26. maven{ url 'https://maven.aliyun.com/repository/google'} //修改
  27. maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'} //修改
  28. maven{ url 'https://maven.aliyun.com/repository/public'} //修改
  29. maven{ url 'https://maven.aliyun.com/repository/jcenter'} //修改
  30. maven { url "https://jitpack.io" }
  31. jcenter()
  32. google()
  33. mavenCentral()
  34. }
  35. apply plugin: 'idea'
  36. buildDir = new File(rootDir, "gradle-build/${path.replaceAll(':', '/')}")
  37. }
  38. task clean(type: Delete) {
  39. delete rootProject.buildDir
  40. }