build.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. apply from: "config.gradle"
  3. buildscript {
  4. repositories {
  5. google()
  6. jcenter()
  7. }
  8. dependencies {
  9. classpath 'com.android.tools.build:gradle:3.5.3'
  10. // add greendao plugin
  11. classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'//greenDao生产代码插件
  12. classpath 'com.novoda:bintray-release:0.7.0'
  13. // NOTE: Do not place your application dependencies here; they belong
  14. // in the individual module build.gradle files
  15. }
  16. }
  17. allprojects {
  18. repositories {
  19. google()
  20. jcenter()
  21. mavenCentral()
  22. maven {
  23. url "http://mvn.gt.igexin.com/nexus/content/repositories/releases/"
  24. }
  25. maven { url 'https://jitpack.io' }
  26. //Maven URL地址
  27. }
  28. subprojects {
  29. project.configurations.all {
  30. resolutionStrategy.eachDependency { details ->
  31. if (details.requested.group == 'com.android.support'
  32. && !details.requested.name.contains('multidex')) {
  33. details.useVersion "27.1.0"
  34. }
  35. }
  36. }
  37. }
  38. // 组件缓存更新时间设置(默认每次build都更新)
  39. configurations.all {
  40. resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
  41. }
  42. }
  43. task clean(type: Delete) {
  44. delete rootProject.buildDir
  45. }