-
Notifications
You must be signed in to change notification settings - Fork 111
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
Upgrade to RxJava 1.0.17 #182
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cc93d4d
Add new interval overloads
zsxwing c3fc560
Add concatEager and concatMapEager
zsxwing 3795a70
Add flattenDelayError overload
zsxwing 8d99ae6
Add BlockingObservable.subscribe
zsxwing ee44921
Deprecate some methods and fix broken links
zsxwing fd7eebb
Fix doc link warnings
zsxwing f9e0191
Bump RxJava to 1.0.17
zsxwing 2b85098
Build doc
zsxwing 83f98a8
Fix doc
zsxwing bc7aae8
Update concatMapEager signature and add comment for fromCallable and …
zsxwing 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 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
This file contains 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 |
---|---|---|
|
@@ -19,7 +19,64 @@ crossScalaVersions in ThisBuild := Seq("2.10.5", "2.11.6") | |
parallelExecution in Test := false | ||
|
||
libraryDependencies ++= Seq( | ||
"io.reactivex" % "rxjava" % "1.0.12", | ||
"io.reactivex" % "rxjava" % "1.0.17", | ||
"org.mockito" % "mockito-core" % "1.9.5" % "test", | ||
"junit" % "junit" % "4.11" % "test", | ||
"org.scalatest" %% "scalatest" % "2.2.2" % "test") | ||
|
||
// Set up the doc mappings | ||
// See http://stackoverflow.com/questions/16934488/how-to-link-classes-from-jdk-into-scaladoc-generated-doc | ||
autoAPIMappings := true | ||
|
||
val externalJavadocMap = Map( | ||
"rxjava" -> "http://reactivex.io/RxJava/javadoc/index.html" | ||
) | ||
|
||
/* | ||
* The rt.jar file is located in the path stored in the sun.boot.class.path system property. | ||
* See the Oracle documentation at http://docs.oracle.com/javase/6/docs/technotes/tools/findingclasses.html. | ||
*/ | ||
val rtJar: String = System.getProperty("sun.boot.class.path").split(java.io.File.pathSeparator).collectFirst { | ||
case str: String if str.endsWith(java.io.File.separator + "rt.jar") => str | ||
}.get // fail hard if not found | ||
|
||
val javaApiUrl: String = "http://docs.oracle.com/javase/8/docs/api/index.html" | ||
|
||
val allExternalJavadocLinks: Seq[String] = javaApiUrl +: externalJavadocMap.values.toSeq | ||
|
||
import scala.util.matching.Regex | ||
import scala.util.matching.Regex.Match | ||
|
||
def javadocLinkRegex(javadocURL: String): Regex = ("""\"(\Q""" + javadocURL + """\E)#([^"]*)\"""").r | ||
|
||
def hasJavadocLink(f: File): Boolean = allExternalJavadocLinks exists { | ||
javadocURL: String => | ||
(javadocLinkRegex(javadocURL) findFirstIn IO.read(f)).nonEmpty | ||
} | ||
|
||
val fixJavaLinks: Match => String = m => | ||
m.group(1) + "?" + m.group(2).replace(".", "/") + ".html" | ||
|
||
apiMappings ++= { | ||
// Lookup the path to jar from the classpath | ||
val classpath = (fullClasspath in Compile).value | ||
def findJar(nameBeginsWith: String): File = { | ||
classpath.find { attributed: Attributed[File] => (attributed.data ** s"$nameBeginsWith*.jar").get.nonEmpty }.get.data // fail hard if not found | ||
} | ||
// Define external documentation paths | ||
(externalJavadocMap map { | ||
case (name, javadocURL) => findJar(name) -> url(javadocURL) | ||
}) + (file(rtJar) -> url(javaApiUrl)) | ||
} | ||
|
||
// Override the task to fix the links to JavaDoc | ||
doc in Compile <<= (doc in Compile) map { target: File => | ||
(target ** "*.html").get.filter(hasJavadocLink).foreach { f => | ||
val newContent: String = allExternalJavadocLinks.foldLeft(IO.read(f)) { | ||
case (oldContent: String, javadocURL: String) => | ||
javadocLinkRegex(javadocURL).replaceAllIn(oldContent, fixJavaLinks) | ||
} | ||
IO.write(f, newContent) | ||
} | ||
target | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not exactly what I'd call a maintainable build setup... ;-) but as long as it works, I'm ok with it |
This file contains 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
This file contains 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
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.
Also add
doc
to the build script so that we can test it for PRs