-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
93 lines (76 loc) · 2.89 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
buildscript {
ext.kotlin_version = '1.3.50'
ext.javapoet_version = '1.11.1'
ext.gson_version = '2.8.1'
ext.junit_version = '4.12'
repositories {
jcenter()
}
}
plugins {
id "org.sonarqube" version "2.6.2"
}
apply from: "${project.rootDir}/scripts/jacoco-setup.gradle"
allprojects {
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
}
sonarqube {
properties {
property "sonar.projectName", "Gsonpath"
property "sonar.projectKey", "gsonpath"
}
}
task integrationCodeCoverageReport(type: JacocoReport) {
executionData fileTree(dir: "compiler/standard").include("**/build/jacoco/*.exec")
// Ignore extension code
def excludes = ['gsonpath/compiler/ExtensionFieldMetadata.class']
classDirectories = fileTree(dir: "compiler/standard/build/classes/java/main") +
fileTree(dir: "compiler/standard/build/classes/kotlin/main") +
fileTree(dir: "compiler/base/build/classes/java/main", excludes: excludes) +
fileTree(dir: "compiler/base/build/classes/kotlin/main", excludes: excludes)
sourceDirectories = files('compiler/standard/src/main/java',
'compiler/base/src/main/java')
reports {
xml.setEnabled(true)
xml.destination new File("${buildDir}/reports/jacoco/report.xml")
html.setEnabled(false)
csv.setEnabled(false)
}
dependsOn(':compiler:standard:test')
}
task unitCodeCoverageReport(type: JacocoReport) {
executionData(
fileTree(dir: "compiler/standard").include("**/build/jacoco/*.exec"),
fileTree(dir: "library").include("**/build/jacoco/*.exec"),
fileTree(dir: "library-kt").include("**/build/jacoco/*.exec")
)
// Ignore extension code
def excludes = ['gsonpath/compiler/ExtensionFieldMetadata.class']
classDirectories = fileTree(dir: "compiler/standard/build/classes/java/main") +
fileTree(dir: "compiler/standard/build/classes/kotlin/main") +
fileTree(dir: "compiler/base/build/classes/java/main", excludes: excludes) +
fileTree(dir: "compiler/base/build/classes/kotlin/main", excludes: excludes) +
fileTree(dir: "library/build/classes/java/main") +
fileTree(dir: "library-kt/build/classes/java/main") +
fileTree(dir: "library-kt/build/classes/kotlin/main")
sourceDirectories = files('compiler/standard/src/main/java',
'compiler/base/src/main/java',
'library/src/main/java',
'library-kt/src/main/java')
reports {
xml.setEnabled(true)
xml.destination new File("${buildDir}/reports/jacoco/report.xml")
html.setEnabled(false)
csv.setEnabled(false)
}
dependsOn(
':compiler:standard:test',
':library:test',
':library-kt:test'
)
}