forked from google/physical-web
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
103 lines (87 loc) · 2.12 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
103
plugins {
id 'checkstyle'
id 'findbugs'
id 'java'
id 'pmd'
}
repositories {
jcenter()
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integrationTest/java')
}
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
dependencies {
compile 'org.json:json:20140107'
testCompile 'junit:junit:4.11'
testCompile 'org.skyscreamer:jsonassert:1.2.3'
compile 'commons-codec:commons-codec:1.10'
}
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
}
findbugsMain {
ignoreFailures = false
effort = "max"
reportLevel = "low"
reports {
xml.enabled = false
html.enabled = true
}
}
findbugsTest {
ignoreFailures = false
effort = "max"
reportLevel = "low"
reports {
xml.enabled = false
html.enabled = true
}
}
findbugs {
reportsDir = new File(buildDir, "reports/findbugs")
excludeFilter = new File(projectDir, "config/findbugs/exclude-filter.xml")
}
checkstyle {
configProperties.checkstyleSuppressionsPath =
new File(projectDir, "config/checkstyle/suppressions.xml")
}
pmdMain {
reports {
xml.enabled = false
html.enabled = true
}
}
pmd {
ignoreFailures = false
ruleSetFiles = files(new File(projectDir, "config/pmd/pmd-ruleset.xml"))
ruleSets = []
reportsDir = new File(buildDir, "reports/findbugs")
}
javadoc {
source = sourceSets.main.java
classpath = sourceSets.main.runtimeClasspath
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
}
task wrapper(type: Wrapper) {
gradleVersion = '3.3'
}
integrationTest.dependsOn assemble