build.gradle 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. buildscript {
  2. ext.kotlin_version = '1.8.22'
  3. repositories {
  4. mavenLocal() // 查找本地maven仓库
  5. maven { url 'https://maven.aliyun.com/repository/central' } //central
  6. maven { url 'https://maven.aliyun.com/repository/public' } //jcenter
  7. maven { url 'https://maven.aliyun.com/repository/google' } //google
  8. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } //gradle-plugin
  9. maven { url 'https://maven.aliyun.com/repository/spring' } //spring
  10. maven { url 'https://maven.aliyun.com/repository/spring-plugin' } //spring-plugin
  11. maven { url 'https://maven.aliyun.com/repository/grails-core' } //grails-core
  12. maven { url 'https://maven.aliyun.com/repository/apache-snapshots' } //apache snapshots
  13. mavenCentral()
  14. google()
  15. }
  16. dependencies {
  17. classpath 'com.android.tools.build:gradle:7.0.4'
  18. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  19. }
  20. }
  21. allprojects {
  22. repositories {
  23. mavenLocal() // 查找本地maven仓库
  24. maven { url 'https://maven.aliyun.com/repository/central' } //central
  25. maven { url 'https://maven.aliyun.com/repository/public' } //jcenter
  26. maven { url 'https://maven.aliyun.com/repository/google' } //google
  27. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } //gradle-plugin
  28. maven { url 'https://maven.aliyun.com/repository/spring' } //spring
  29. maven { url 'https://maven.aliyun.com/repository/spring-plugin' } //spring-plugin
  30. maven { url 'https://maven.aliyun.com/repository/grails-core' } //grails-core
  31. maven { url 'https://maven.aliyun.com/repository/apache-snapshots' } //apache snapshots
  32. mavenCentral()
  33. google()
  34. }
  35. }
  36. rootProject.buildDir = '../build'
  37. subprojects {
  38. project.buildDir = "${rootProject.buildDir}/${project.name}"
  39. }
  40. subprojects {
  41. project.evaluationDependsOn(':app')
  42. }
  43. tasks.register("clean", Delete) {
  44. delete rootProject.buildDir
  45. }