zoukankan      html  css  js  c++  java
  • mavenCentral()、jcenter()、google()仓库

    //buildscript里是gradle脚本执行所需依赖,分别是对应的maven库和插件
    buildscript {
        repositories {
    //        google()
    //        jcenter()
            maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
            maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
            maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.3'
            classpath 'com.novoda:bintray-release:+'
     
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
     
    //allprojects里是项目本身需要的依赖
    allprojects {
        repositories {
    //        google()
    //        jcenter()
            maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
            maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
            maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        }
        tasks.withType(Javadoc) { // 新增
            options.addStringOption('Xdoclint:none', '-quiet')
            options.addStringOption('encoding', 'UTF-8')
        }
    }
     
    task clean(type: Delete) {
        delete rootProject.buildDir
    }

    buildscript里的repositories与allprojects里的repositories 区别:
    1. buildscript里是gradle脚本执行所需依赖,分别是对应的maven库和插件
    2.allprojects里是项目本身需要的依赖

    JCenter() 与 mavenCenter() 的区别

    完美解决gradle依赖库导致build慢的问题

  • 相关阅读:
    Hdu 2564 单词缩写(字符串输入流的使用)
    Hdu2824 快速求欧拉函数和
    hdu 1787 欧拉函数模板
    Hdu2558(欧拉函数)
    hdu 1175连连看 (bfs带方向变化次数)
    pandas 使用总结
    APScheduler 定时任务使用总结
    watchdog 监控文件变化使用总结
    js 鼠标特效
    js 生成雪花间隔
  • 原文地址:https://www.cnblogs.com/liuys635/p/14491543.html
Copyright © 2011-2022 走看看