Android 阿里云Maven中央仓库配置

settings.gradle:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        //central https://repo1.maven.org/maven2/
        maven { url 'https://maven.aliyun.com/repository/central' }
        //public central仓和jcenter仓的聚合仓
        maven { url 'https://maven.aliyun.com/repository/public' }
        //jcenter http://jcenter.bintray.com/
        maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
        //google https://maven.google.com/
        maven { url 'https://maven.aliyun.com/repository/google' }
        //gradle-plugin https://plugins.gradle.org/m2/
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        //spring http://repo.spring.io/libs-milestone/
        maven { url 'https://maven.aliyun.com/repository/spring' }
        //spring-plugin http://repo.spring.io/plugins-release/
        maven { url 'https://maven.aliyun.com/repository/spring-plugin' }
        //grails-core https://repo.grails.org/grails/core
        maven { url 'https://maven.aliyun.com/repository/grails-core' }
        //apache snapshots https://repository.apache.org/snapshots/
        maven { url 'https://maven.aliyun.com/repository/apache-snapshots' }
    }
}

build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        //central https://repo1.maven.org/maven2/
        maven { url 'https://maven.aliyun.com/repository/central' }
        //public central仓和jcenter仓的聚合仓
        maven { url 'https://maven.aliyun.com/repository/public' }
        //jcenter http://jcenter.bintray.com/
        maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
        //google https://maven.google.com/
        maven { url 'https://maven.aliyun.com/repository/google' }
        //gradle-plugin https://plugins.gradle.org/m2/
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        //spring http://repo.spring.io/libs-milestone/
        maven { url 'https://maven.aliyun.com/repository/spring' }
        //spring-plugin http://repo.spring.io/plugins-release/
        maven { url 'https://maven.aliyun.com/repository/spring-plugin' }
        //grails-core https://repo.grails.org/grails/core
        maven { url 'https://maven.aliyun.com/repository/grails-core' }
        //apache snapshots https://repository.apache.org/snapshots/
        maven { url 'https://maven.aliyun.com/repository/apache-snapshots' }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.0"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

 

 

 

 

THE END
喜欢就支持一下吧
点赞11赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容