build.gradle 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. apply from: 'versions.gradle'
  4. addRepos(repositories)
  5. dependencies {
  6. /* classpath deps.android_gradle_plugin*/
  7. classpath deps.android_gradle_plugin
  8. classpath deps.kotlin.plugin
  9. // NOTE: Do not place your application dependencies here; they belong
  10. // in the individual module build.gradle files
  11. }
  12. }
  13. allprojects {
  14. addRepos(repositories)
  15. // Android dependency 'com.android.support:design' has different version for the compile (25.3.1) and runtime (25.4.0) classpath.
  16. // You should manually set the same version via DependencyResolution
  17. subprojects {
  18. project.configurations.all {
  19. resolutionStrategy.eachDependency { details ->
  20. if (details.requested.group == 'com.android.support'
  21. && !details.requested.name.contains('multidex')) {
  22. details.useVersion "27.0.0"
  23. }
  24. }
  25. }
  26. }
  27. // 组件缓存更新时间设置(默认每次build都更新)
  28. configurations.all {
  29. resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
  30. }
  31. }
  32. task clean(type: Delete) {
  33. delete rootProject.buildDir
  34. }