Skip to content

Commit b68c718

Browse files
scala is building
1 parent 30455ad commit b68c718

File tree

3 files changed

+45
-6
lines changed

3 files changed

+45
-6
lines changed

language-adaptors/rxjava-scala/build.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ tasks.withType(ScalaCompile) {
1414

1515
dependencies {
1616
// Scala compiler and related tools
17-
scalaTools 'org.scala-lang:scala-compiler:2.9+'
18-
scalaTools 'org.scala-lang:scala-library:2.9+'
19-
20-
compile 'org.scala-lang:scala-library:2.9+'
21-
provided 'org.scalatest:scalatest_2.9.1:1.8'
17+
scalaTools 'org.scala-lang:scala-compiler:2.10+'
18+
scalaTools 'org.scala-lang:scala-library:2.10+'
19+
provided 'org.scalatest:scalatest_2.10:1.9.1'
2220

2321
compile project(':rxjava-core')
2422
provided 'junit:junit:4.10'
2523
provided 'org.mockito:mockito-core:1.8.5'
2624

27-
testCompile 'org.scalatest:scalatest_2.9.1:1.8'
25+
testCompile 'org.scalatest:scalatest_2.10:1.9.1'
2826
}
2927

3028
task test(overwrite: true, dependsOn: testClasses) << {

rxjava-examples/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies {
4040

4141
// scala
4242
scalaTools 'org.scala-lang:scala-compiler:2.10+'
43+
scalaTools 'org.scala-lang:scala-library:2.10+'
4344
provided 'org.scalatest:scalatest_2.10:1.9.1'
4445
}
4546

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package rx.examples.scala
17+
18+
import rx.Observable
19+
20+
class RxExamples {
21+
22+
def main(args: Array[String]) {
23+
hello("Ben", "George");
24+
}
25+
26+
// --------------------------------------------------
27+
// Hello World!
28+
// --------------------------------------------------
29+
30+
def hello(names: String*) {
31+
// can't figure out how to convert to a Java iterable
32+
Observable.toObservable("Ben", "George")
33+
.take(2)
34+
.subscribe((name: String) => {
35+
println("Hello " + name + "!")
36+
})
37+
}
38+
39+
}
40+

0 commit comments

Comments
 (0)