当前位置:   article > 正文

在 build.gradle.kts 添加 阿里云仓库_gradle 阿里云

gradle 阿里云

在 build.gradle.kts 添加 maven 仓库
使用 kotlin script DSL 配置 build.gradle.kts (高版本移动到settings.gradle.kts)时,添加 maven 仓库的方式如下:

  1. pluginManagement {
  2. repositories {
  3. maven {
  4. setUrl("https://maven.aliyun.com/repository/google")
  5. }
  6. maven {
  7. setUrl("https://maven.aliyun.com/repository/public")
  8. }
  9. maven {
  10. setUrl("https://maven.aliyun.com/repository/gradle-plugin")
  11. }
  12. google()
  13. mavenCentral()
  14. gradlePluginPortal()
  15. }
  16. }

build.gradle里面配置:

  1. repositories {
  2. maven { url 'https://maven.aliyun.com/repository/google' } // google
  3. maven { url 'https://maven.aliyun.com/repository/public' } // central & jcenter
  4. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  5. maven { url "https://jitpack.io" }
  6. maven { url 'https://repo.huaweicloud.com/repository/maven/' }
  7. google()
  8. mavenCentral()
  9. }
  10. allprojects {
  11. repositories {
  12. maven { url 'https://maven.aliyun.com/repository/google' } // google
  13. maven { url 'https://maven.aliyun.com/repository/public' } // central & jcenter
  14. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  15. maven { url "https://jitpack.io" }
  16. maven { url 'https://repo.huaweicloud.com/repository/maven/' }
  17. google()
  18. mavenCentral()
  19. }
  20. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/503685
推荐阅读
相关标签
  

闽ICP备14008679号