forked from scalapb/Lenses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
63 lines (52 loc) · 1.57 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
import ReleaseTransformations._
scalaVersion := "2.11.8"
crossScalaVersions := Seq("2.11.8", "2.10.6", "2.12.0")
organization in ThisBuild := "com.trueaccord.lenses"
scalacOptions in ThisBuild ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v <= 11 => List("-target:jvm-1.7")
case _ => Nil
}
}
releaseCrossBuild := true
releasePublishArtifactsAction := PgpKeys.publishSigned.value
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _), enableCrossBuild = true),
setNextVersion,
commitNextVersion,
pushChanges,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _), enableCrossBuild = true)
)
lazy val root = project.in(file("."))
.aggregate(lensesJS, lensesJVM)
.settings(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val lenses = crossProject.in(file("."))
.settings(
name := "lenses"
)
.jvmSettings(
libraryDependencies ++= Seq(
"org.scalacheck" %%% "scalacheck" % "1.13.4" % "test",
"org.scalatest" %%% "scalatest" % "3.0.0" % "test"
)
)
.jsSettings(
scalacOptions += {
val a = (baseDirectory in LocalRootProject).value.toURI.toString
val g = "https://raw.githubusercontent.com/trueaccord/Lenses/" + sys.process.Process("git rev-parse HEAD").lines_!.head
s"-P:scalajs:mapSourceURI:$a->$g/"
}
)
lazy val lensesJVM = lenses.jvm
lazy val lensesJS = lenses.js