-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
69 lines (63 loc) · 1.93 KB
/
build.sbt
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
lazy val catsVersion = "0.9.0"
lazy val rxVersion = "2.0.6"
lazy val generateSettings = Seq(
sourceGenerators in Compile <+= KConvertGenerator.generate(9),
sourceGenerators in Compile <+= ConversionGenerator
.generate(
0 -> Seq(Interfaces.callable, Interfaces.action),
1 -> Seq(Interfaces.predicate, Interfaces.function, Interfaces.consumer),
2 -> Seq(Interfaces.bifunction, Interfaces.biPredicate),
3 -> Seq(Interfaces.function3),
4 -> Seq(Interfaces.function4),
5 -> Seq(Interfaces.function5),
6 -> Seq(Interfaces.function6),
7 -> Seq(Interfaces.function7),
8 -> Seq(Interfaces.function8),
9 -> Seq(Interfaces.function9)
)
)
lazy val commonScalacOptions = Seq(
"-encoding", "UTF-8",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps"
)
lazy val commonSettings = Seq(
organization := "io.reactivex",
version := "2.0.0-SNAPSHOT",
scalaVersion := "2.12.1",
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.1"),
libraryDependencies ++= Seq(
"io.reactivex.rxjava2" % "rxjava" % rxVersion,
"org.scalatest" %% "scalatest" % "3.0.1" % "test"
),
scalacOptions ++= commonScalacOptions,
doctestTestFramework := DoctestTestFramework.ScalaTest
)
lazy val core = (project in file("core"))
.settings(
name := "rxscala",
commonSettings,
generateSettings,
initialCommands :=
s"""
import io.rx._
import io.rx.implicits._
"""
)
lazy val cats = (project in file("cats"))
.settings(libraryDependencies += "org.typelevel" %% "cats-core" % catsVersion)
.dependsOn(core)
.settings(
name := "rxscala-cats",
commonSettings,
initialCommands :=
s"""
import cats._
import cats.implicits._
import io.rx._
import io.rx.implicits._
import io.rx.cats.implicits._
"""
)
lazy val root = (project in file(".")).aggregate(cats, core)