-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
98 lines (81 loc) · 2.83 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: rootProject.file('config/hooks/install-git-hooks.gradle')
buildscript {
ext.versions = ['minSdk' : 14,
'compileSdk' : 27,
'buildTools' : '27.0.3',
'supportLibrary': '25.3.1',]
ext.deps = [findbugs : 'com.google.code.findbugs:jsr305:2.0.1',
junit : 'junit:junit:4.12',
easymock : 'org.easymock:easymock:3.4',
rxjava : 'io.reactivex:rxjava:1.3.4',
rxjava2 : 'io.reactivex.rxjava2:rxjava:2.1.6',
rxbinding : 'com.jakewharton.rxbinding:rxbinding:1.0.1',
rxbinding2 : 'com.jakewharton.rxbinding2:rxbinding:2.0.0',
'support' : ['compat': "com.android.support:support-compat:${versions.supportLibrary}",
'design': "com.android.support:design:${versions.supportLibrary}",],]
repositories {
google()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
}
}
allprojects {
repositories {
jcenter()
}
ext {
// plugin for all (checkstyle, pmd and findbugs)
quality_gradle_java_file = "config/quality_java.gradle"
quality_gradle_android_file = "config/quality_android.gradle"
jacoco_gradle_java_file = "config/jacoco_java.gradle"
// config files
pmd_rulesetFile = "${project.rootDir}/config/pmd/pmd-ruleset.xml"
findbugs_excludeFile = "${project.rootDir}/config/findbugs/excludeFilter.xml"
}
}
subprojects { project ->
group = GROUP
version = VERSION_NAME
}
apply plugin: 'jacoco'
//https://gist.github.com/aalmiray/e6f54aa4b3803be0bcac
task jacocoTestReport(type: JacocoReport) {
sourceDirectories = files()
classDirectories = files()
executionData = files()
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
// Work-around to allow us to build list of executionData files in doFirst
onlyIf = {
true
}
/*
* Builds list of source dirs, class dirs, and executionData files
* when task is run, not at script evaluation time
*/
doFirst {
subprojects.findAll { subproject ->
subproject.pluginManager.hasPlugin('jacoco')
}.each { subproject ->
additionalSourceDirs files((Set<File>) subproject.sourceSets.main.allJava.srcDirs)
additionalClassDirs((FileCollection) subproject.sourceSets.main.output)
executionData subproject.tasks.jacocoTestReport.executionData
}
executionData = files(executionData.findAll {
it.exists()
})
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}