forked from ReactiveX/RxJava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
136 lines (114 loc) · 3.24 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:4.0.0'
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.1.0'
}
}
description = 'RxJava: Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.'
apply plugin: 'java'
//apply plugin: 'pmd'
apply plugin: 'findbugs'
apply plugin: 'jacoco'
apply plugin: 'ru.vyarus.animalsniffer'
apply plugin: 'nebula.rxjava-project'
repositories {
mavenCentral()
}
dependencies {
signature 'org.codehaus.mojo.signature:java16:1.1@signature'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'com.google.guava:guava:19.0'
testCompile 'com.pushtorefresh.java-private-constructor-checker:checker:1.2.0'
perfCompile 'org.openjdk.jmh:jmh-core:1.11.3'
perfCompile 'org.openjdk.jmh:jmh-generator-annprocess:1.11.3'
}
javadoc {
exclude "**/rx/internal/**"
exclude "**/test/**"
exclude "**/perf/**"
options {
windowTitle = "RxJava Javadoc ${project.version}"
}
// Clear the following options to make the docs consistent with the old format
options.addStringOption('top').value = ''
options.addStringOption('doctitle').value = ''
options.addStringOption('header').value = ''
if (JavaVersion.current().isJava7()) {
// "./gradle/stylesheet.css" only supports Java 7
options.addStringOption('stylesheetfile', rootProject.file('./gradle/stylesheet.css').toString())
}
}
// support for snapshot/final releases with the various branches RxJava uses
nebulaRelease {
addReleaseBranchPattern(/\d+\.\d+\.\d+/)
addReleaseBranchPattern('HEAD')
}
if (project.hasProperty('release.useLastTag')) {
tasks.prepare.enabled = false
}
test{
maxHeapSize = "1200m"
}
license {
excludes(["**/*.md", "**/*.txt", "**/unsafe/*.java", "**/atomic/*.java", "**/Beta.java", "**/Experimental.java"])
}
jacoco {
toolVersion = '0.7.7.201606060606' // See http://www.eclemma.org/jacoco/.
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
build.dependsOn jacocoTestReport
//pmd {
// toolVersion = '5.4.2'
// ignoreFailures = true
// sourceSets = [sourceSets.main]
// ruleSets = []
// ruleSetFiles = files('pmd.xml')
//}
//pmdMain {
// reports {
// html.enabled = true
// xml.enabled = true
// }
//}
//task pmdPrint(dependsOn: 'pmdMain') << {
// File file = new File('build/reports/pmd/main.xml')
// if (file.exists()) {
//
// println("Listing first 100 PMD violations")
//
// file.eachLine { line, count ->
// if (count <= 100) {
// println(line)
// }
// }
//
// } else {
// println("PMD file not found.")
// }
//}
//build.dependsOn pmdPrint
animalsniffer {
annotation = 'rx.internal.util.SuppressAnimalSniffer'
}
findbugs {
ignoreFailures true
toolVersion = '3.0.1'
effort = 'max'
reportLevel = 'low'
sourceSets = [sourceSets.main]
}
findbugsMain {
reports {
html.enabled = false // Findbugs can only have on report enabled
xml.enabled = true
}
}