buildscript {
repositories {
maven {url'https://maven.aliyun.com/repository/public/' }
maven { url'https://maven.aliyun.com/repository/google/' }
maven { url'https://maven.aliyun.com/repository/jcenter/' }
maven { url'https://maven.aliyun.com/repository/central/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
}
allprojects {
repositories {
maven { url'https://maven.aliyun.com/repository/public/' }
maven { url'https://maven.aliyun.com/repository/google/' }
maven { url'https://maven.aliyun.com/repository/jcenter/' }
maven { url'https://maven.aliyun.com/repository/central/' }
maven { url 'https://jitpack.io' }
mavenCentral()
}
}
1、buildscript是gradle脚本执行需要的依赖,分别是对应的maven库和插件
2、allprojects里是项目本身需要的依赖, 比如我们平时用到的第三库用到了自己的maven库,就需要在这引入。
官网资料:https://developer.android.com/studio/build
网友评论