-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
75 lines (69 loc) · 2.06 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
70
71
72
73
74
75
import ReleaseTransformations._
import sbtcrossproject.CrossPlugin.autoImport.crossProject
lazy val impSettings = Seq(
organization := "org.spire-math",
scalaVersion := crossScalaVersions.value.last,
crossScalaVersions := Seq("2.11.12", "2.12.8", "2.13.1"),
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided",
"org.scalatest" %%% "scalatest" % "3.1.1" % "test"
),
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-feature"
),
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
homepage := Some(url("http://github.com/non/imp")),
// release stuff
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := Function.const(false),
publishTo := Some(
if(isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
pomExtra := (
<scm>
<url>[email protected]:non/imp.git</url>
<connection>scm:git:[email protected]:non/imp.git</connection>
</scm>
<developers>
<developer>
<id>d_m</id>
<name>Erik Osheim</name>
<url>http://github.com/non/</url>
</developer>
</developers>
),
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
ReleaseStep(action = Command.process("+test", _)),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
pushChanges))
lazy val noPublish = Seq(
publish := {},
publishLocal := {},
publishArtifact := false)
lazy val root = project.in(file("."))
.aggregate(impJS, impJVM)
.settings(name := "imp-root")
.settings(impSettings: _*)
.settings(noPublish: _*)
lazy val imp = crossProject(JSPlatform, JVMPlatform).in(file("."))
.settings(name := "imp")
.settings(impSettings: _*)
lazy val impJVM = imp.jvm
lazy val impJS = imp.js