示例代码:
repositories {
mavenCentral()
// ... 其他仓库
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://jitpack.io" }
}
dependencies {
// ... 依赖库
classpath "com.android.tools.build:gradle:4.2.2"
}
示例代码:
dependencies {
// ... 其他库依赖
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:1.0.2'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.2'
}
repositories {
mavenCentral()
google()
jcenter()
maven { url "http://dl.bintray.com/glmedic/maven" }
}
示例代码:
buildscript {
repositories {
mavenCentral()
}
dependencies {
// ... 其他依赖库
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
plugins {
id 'com.github.dcendents.android-maven' version '2.1'
id 'com.jfrog.bintray' version '1.8.4'
}
示例代码:
repositories {
mavenCentral()
// ... 其他仓库
}
dependencies {
implementation 'com.squareup.okhttp:okhttp:3.10.0'
}
上一篇:闭源框架及其资源和依赖项
下一篇:bi与大数据的关系