赞
踩
在 build.gradle.kts 添加 maven 仓库
使用 kotlin script DSL 配置 build.gradle.kts (高版本移动到settings.gradle.kts)时,添加 maven 仓库的方式如下:
pluginManagement { repositories { maven { setUrl("https://maven.aliyun.com/repository/google") } maven { setUrl("https://maven.aliyun.com/repository/public") } maven { setUrl("https://maven.aliyun.com/repository/gradle-plugin") } google() mavenCentral() gradlePluginPortal() } }
build.gradle里面配置:
repositories { maven { url 'https://maven.aliyun.com/repository/google' } // google maven { url 'https://maven.aliyun.com/repository/public' } // central & jcenter maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } maven { url "https://jitpack.io" } maven { url 'https://repo.huaweicloud.com/repository/maven/' } google() mavenCentral() } allprojects { repositories { maven { url 'https://maven.aliyun.com/repository/google' } // google maven { url 'https://maven.aliyun.com/repository/public' } // central & jcenter maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } maven { url "https://jitpack.io" } maven { url 'https://repo.huaweicloud.com/repository/maven/' } google() mavenCentral() } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。