-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Nebula Build - Single Module #1644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,147 +1,15 @@ | ||
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() | ||
} | ||
repositories { jcenter() } | ||
dependencies { classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:1.12.+' } | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'java' | ||
apply plugin: 'shadow' | ||
group = "com.netflix.rxjava" | ||
|
||
// everything defaults to 1.6 | ||
sourceCompatibility = JavaVersion.VERSION_1_6 | ||
targetCompatibility = JavaVersion.VERSION_1_6 | ||
|
||
// 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 | ||
} | ||
group = 'io.reactivex' | ||
description = 'RxJava: Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.' | ||
|
||
sourceSets { | ||
examples | ||
perf { | ||
compileClasspath += sourceSets.main.output | ||
} | ||
} | ||
apply plugin: 'rxjava-project' | ||
|
||
tasks.build { | ||
//include 'examples' in build task | ||
dependsOn(examplesClasses) | ||
dependsOn(perfClasses) | ||
} | ||
|
||
task perfJar(type: Jar, dependsOn: perfClasses) { | ||
from sourceSets.perf.output + sourceSets.main.output | ||
} | ||
|
||
dependencies { | ||
perfCompile 'org.openjdk.jmh:jmh-core:0.9' | ||
perfCompile 'org.openjdk.jmh:jmh-generator-annprocess:0.9' | ||
} | ||
|
||
artifacts { | ||
perfRuntime perfJar | ||
} | ||
|
||
eclipse { | ||
classpath { | ||
plusConfigurations += configurations.perfCompile | ||
|
||
downloadSources = true | ||
downloadJavadoc = true | ||
} | ||
} | ||
|
||
idea { | ||
module { | ||
scopes.PROVIDED.plus += configurations.perfCompile | ||
scopes.PROVIDED.minus += configurations.compile | ||
} | ||
} | ||
|
||
/** | ||
* By default: Run without arguments this will execute all benchmarks that are found (can take a long time). | ||
* | ||
* Optionally pass arguments for custom execution. Example: | ||
* | ||
* ../gradlew benchmarks '-Pjmh=-f 1 -tu ns -bm avgt -wi 5 -i 5 -r 1 .*OperatorSerializePerf.*' | ||
* | ||
* To see all options: | ||
* | ||
* ../gradlew benchmarks '-Pjmh=-h' | ||
*/ | ||
task benchmarks(type: JavaExec) { | ||
main = 'org.openjdk.jmh.Main' | ||
classpath = sourceSets.perf.runtimeClasspath + sourceSets.main.output | ||
maxHeapSize = "512m" | ||
jvmArgs '-XX:+UnlockCommercialFeatures' | ||
jvmArgs '-XX:+FlightRecorder' | ||
jvmArgs '-XX:AutoBoxCacheMax=1000000' | ||
|
||
if (project.hasProperty('jmh')) { | ||
args(jmh.split(' ')) | ||
} else { | ||
//args '-h' // help output | ||
args '-f' // fork | ||
args '1' | ||
args '-wi' // warmup iterations | ||
args '5' | ||
args '-i' // test iterations | ||
args '5' | ||
args '-r' // time per execution in seconds | ||
args '5' | ||
//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 | ||
} | ||
} | ||
|
||
shadow { | ||
classifier = "benchmarks" | ||
includeDependenciesFor = ["runtime", "perfRuntime"] | ||
|
||
transformer(com.github.jengelman.gradle.plugins.shadow.transformers.ManifestResourceTransformer) { | ||
mainClass = "org.openjdk.jmh.Main" | ||
} | ||
} | ||
|
||
shadowJar.dependsOn perfJar | ||
dependencies { | ||
testCompile 'junit:junit-dep:4.10' | ||
testCompile 'org.mockito:mockito-core:1.8.5' | ||
} | ||
|
||
project(':rxjava') { | ||
sourceSets.test.java.srcDir 'src/test/java' | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Group isn't need, since the plugin will set it when it's applied.