-
Notifications
You must be signed in to change notification settings - Fork 7.6k
/
Copy pathbuild.gradle
112 lines (94 loc) · 2.84 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
ext.githubProjectName = 'RxJava'
apply from: file('gradle/convention.gradle')
apply from: file('gradle/maven.gradle')
//apply from: file('gradle/check.gradle')
apply from: file('gradle/license.gradle')
apply from: file('gradle/release.gradle')
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
apply from: file('gradle/buildscript.gradle'), to: buildscript
}
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
repositories {
mavenLocal()
mavenCentral()
}
}
subprojects {
apply plugin: 'java'
group = "com.netflix.rxjava"
// make 'examples' use the same classpath
configurations {
examplesCompile.extendsFrom compile
examplesRuntime.extendsFrom runtime
perfCompile.extendsFrom compile
perfRuntime.extendsFrom runtime
}
tasks.withType(Javadoc).each {
it.classpath = sourceSets.main.compileClasspath
}
sourceSets {
examples
perf {
compileClasspath += sourceSets.main.output
}
}
tasks.build {
//include 'examples' in build task
dependsOn(examplesClasses)
dependsOn(perfClasses)
}
dependencies {
perfCompile 'org.openjdk.jmh:jmh-core:0.5.3'
perfCompile 'org.openjdk.jmh:jmh-generator-annprocess:0.5.3'
//perfCompile project
}
eclipse {
classpath {
plusConfigurations += configurations.perfCompile
downloadSources = true
downloadJavadoc = true
}
}
idea {
module {
scopes.PROVIDED.plus += configurations.perfCompile
scopes.PROVIDED.minus += configurations.compile
}
}
task benchmarks(type: JavaExec) {
main = 'org.openjdk.jmh.Main'
classpath = sourceSets.perf.runtimeClasspath + sourceSets.main.output
maxHeapSize = "512m"
// args '-h' // help output
args '-f' // fork
args '1'
args '-tu' // time unit
args 'ns'
args '-bm' // benchmark mode
args 'avgt'
args '-wi' // warmup iterations
args '5'
args '-i' // test iterations
args '5'
args '-r' // time per execution in seconds
args '1'
// args '-prof' // profilers
// args 'HS_GC' // HotSpot (tm) memory manager (GC) profiling via implementation-specific MBeans
// args 'HS_RT' // HotSpot (tm) runtime profiling via implementation-specific MBeans
// args 'HS_THR' // HotSpot (tm) threading subsystem via implementation-specific MBeans
// args 'HS_COMP' // HotSpot (tm) JIT compiler profiling via implementation-specific MBeans
// args 'HS_CL' // HotSpot (tm) classloader profiling via implementation-specific MBeans
// args 'STACK' // Simple and naive Java stack profiler
// args '.*OperatorSerializePerf.*' // for running only a specific test
}
}
project(':rxjava-core') {
sourceSets.test.java.srcDir 'src/test/java'
}