@@ -10,19 +10,9 @@ buildscript {
1010 repositories {
1111 mavenLocal()
1212 mavenCentral()
13- maven {
14- // FIXME: waiting for https://github.com/johnrengelman/shadow/pull/38 to merge
15- name ' Shadow'
16- url ' http://dl.bintray.com/content/gvsmirnov/gradle-plugins'
17- }
1813 jcenter()
1914 }
2015
21- dependencies {
22- // Required for benchmarks
23- classpath ' com.github.jengelman.gradle.plugins:shadow:0.8.1'
24- }
25-
2616 apply from : file(' gradle/buildscript.gradle' ), to : buildscript
2717}
2818
@@ -43,6 +33,8 @@ subprojects {
4333 configurations {
4434 examplesCompile. extendsFrom compile
4535 examplesRuntime. extendsFrom runtime
36+ perfCompile. extendsFrom compile
37+ perfRuntime. extendsFrom runtime
4638 }
4739
4840
@@ -52,19 +44,22 @@ subprojects {
5244
5345 sourceSets {
5446 examples
55- perf
47+ perf {
48+ compileClasspath + = sourceSets. main. output
49+ }
5650 }
5751
5852 tasks. build {
5953 // include 'examples' in build task
6054 dependsOn(examplesClasses)
55+ dependsOn(perfClasses)
6156 }
6257
6358 dependencies {
6459 perfCompile ' org.openjdk.jmh:jmh-core:0.5.3'
6560 perfCompile ' org.openjdk.jmh:jmh-generator-annprocess:0.5.3'
6661
67- perfCompile project
62+ // perfCompile project
6863 }
6964
7065 eclipse {
@@ -83,28 +78,11 @@ subprojects {
8378 }
8479 }
8580
86- task perfJar(type : Jar , dependsOn : perfClasses) {
87- from sourceSets. perf. output + sourceSets. main. output
88- }
89-
90- task benchmarks(dependsOn : perfJar) {
91-
92- apply plugin : " shadow"
93-
94- shadow {
95- classifier = " benchmarks"
96- includeDependenciesFor = [" runtime" , " perfRuntime" ]
97-
98- transformer(com.github.jengelman.gradle.plugins.shadow.transformers.ManifestResourceTransformer ) {
99- mainClass = " org.openjdk.jmh.Main"
100- }
101- }
102-
103- doLast {
104- shadowJar. execute()
105- }
106-
107- }
81+ task benchmarks(type : JavaExec ) {
82+ main = ' org.openjdk.jmh.Main'
83+ classpath = sourceSets. perf. runtimeClasspath + sourceSets. main. output
84+ }
85+
10886}
10987
11088project(' :rxjava-core' ) {
0 commit comments