-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.gradle
50 lines (47 loc) · 1.49 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "config.gradle"
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
allprojects {
repositories {
google()
jcenter()
//本地Maven仓库地址,取决于你的磁盘目录
// maven { url 'file://D://AndroidStudioProjects//iPlayer//maven' }
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
}
}
}
//当androidx.core 版本冲突时,强制gradle使用指定版本
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency {
details -> if (details.requested.group == 'androidx.core' && !details.requested.name.contains('androidx'))
{ details.useVersion "1.6.0" }
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}