forked from ReactiveX/RxJava
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
112 lines (88 loc) · 2.53 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()
maven {
//FIXME: waiting for https://github.com/johnrengelman/shadow/pull/38 to merge
name 'Shadow'
url 'http://dl.bintray.com/content/gvsmirnov/gradle-plugins'
}
jcenter()
}
dependencies {
// Required for benchmarks
classpath 'com.github.jengelman.gradle.plugins:shadow:0.8.1'
}
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
}
tasks.withType(Javadoc).each {
it.classpath = sourceSets.main.compileClasspath
}
sourceSets {
examples
perf
}
tasks.build {
//include 'examples' in build task
dependsOn(examplesClasses)
}
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 perfJar(type: Jar, dependsOn: perfClasses) {
from sourceSets.perf.output + sourceSets.main.output
}
task benchmarks(dependsOn: perfJar) {
apply plugin: "shadow"
shadow {
classifier = "benchmarks"
includeDependenciesFor = ["runtime", "perfRuntime"]
transformer(com.github.jengelman.gradle.plugins.shadow.transformers.ManifestResourceTransformer) {
mainClass = "org.openjdk.jmh.Main"
}
}
doLast {
shadowJar.execute()
}
}
}
project(':rxjava-core') {
sourceSets.test.java.srcDir 'src/test/java'
}