/
build.gradle
53 lines (49 loc) · 1.45 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
buildscript {
ext {
kotlin_version = '1.3.72'
lint_version = '26.5.3'
agp_version = '3.5.3'
upload_lint_plugin = false
upload_lint_library = false
upload_lint_patch = false
}
repositories {
maven {
url uri("./repo")
}
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$agp_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.novoda:bintray-release:0.9.2'
classpath 'com.rocketzly:lintPlugin:0.0.7'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects {
afterEvaluate { p ->
if (plugins.hasPlugin("com.android.application") ||
plugins.hasPlugin("com.android.library")) {
tasks.getByName('lint').doFirst {
def expect = ['clean', 'build', 'bintrayUpload']
def res = gradle.startParameter.taskNames
if (res == expect) {
println "执行task为上传Jcenter:${expect},动态修改lintOptions.abortOnError为false"
p.android.lintOptions.abortOnError = false
}
}
}
}
}