forked from REBOOTERS/AndroidAnimationExercise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (90 loc) · 2.87 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
apply from: file('config.gradle')
repositories {
google()
jcenter()
mavenCentral()
maven {
url('repo')
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.android.tools.build:gradle:${gradle_version}"
classpath "com.alibaba:arouter-register:$arouter_register"
// classpath "com.engineer.plugin:phoenix:1.0.7"
classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.3.1"
// classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4'
// jacoco https://github.com/arturdm/jacoco-android-gradle-plugin
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
// https://github.com/didi/DoraemonKit
classpath "com.didichuxing.doraemonkit:dokitx-plugin:$doraemonkit"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
//plugins {
// id 'com.gradle.build-scan' version '3.3.3'
//}
//buildScan {
// termsOfServiceUrl = 'https://gradle.com/terms-of-service'
// termsOfServiceAgree = 'yes'
//}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {
url('repo')
}
maven { url 'https://jitpack.io' }
}
tasks.whenTaskAdded {
tasks.each { task ->
// println("task name==" + task.name)
// if (task.name.contains("Test") || task.name.contains("test")) {
// task.enabled = false
// }
// if (task.name.contains("lint") || task.name.contains("Lint")) {
// task.enabled = false
// }
// if (task.name.contains("Release") || task.name.contains("release")) {
// task.enabled = false
// }
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
delete rootDir.toString() + File.separator + apkDir
delete rootDir.toString() + File.separator + "repo"
}
subprojects { sub ->
sub.beforeEvaluate {
project
println "#### Evaluate before of " + project.path
}
sub.afterEvaluate {
project
println "#### Evaluate after of " + project.path
}
}
allprojects {
tasks.withType(Test).configureEach {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
if (!project.hasProperty("createReports")) {
reports.html.required = false
reports.junitXml.required = false
}
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "4000"
options.compilerArgs << "-Xmaxwarns" << "4000"
}
}
}