-
Notifications
You must be signed in to change notification settings - Fork 74
/
build.gradle
53 lines (48 loc) · 1.58 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Top-level build file where you can add configuration options common to all sub-projects/modules.
//应用Config配置文件
apply from: "config.gradle"
//应用Bintray配置文件
//apply from: "bintray.gradle"
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
//添加bintray环境
// classpath 'com.novoda:bintray-release:0.8.1'
//添加jitpack.io环境
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
allprojects {
repositories {
google()
jcenter()
//本地Maven仓库地址,取决于你的磁盘目录
// maven { url 'file://D://AndroidStudioProjects//IMusic//maven' }
//本地局域网仓库地址
// maven { url 'http://localhost:8081/nexus/content/repositories/releases/' }
//Bintray插件仓库支持
maven { url 'https://dl.bintray.com/novoda-oss/snapshots/' }
maven { url 'https://jitpack.io' }
}
//编译时报注释GBK编码错误解决
tasks.withType(Javadoc) {
//方法上忽略@return和@param注解未添加说明注释
options.addStringOption('Xdoclint:none', '-quiet')
//解决GBK编码错误提示
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
//跳过构建时link检查
tasks.whenTaskAdded { task ->
if (task.name.equals("lint")) {
task.enabled = false
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}