This repository has been archived by the owner on Jul 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild.sbt
94 lines (79 loc) · 2.58 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import sbtcrossproject.{crossProject, CrossType}
import ReleaseTransformations._
val Scala211 = "2.11.12"
val Scala212 = "2.12.8"
lazy val machinistSettings = Seq(
organization := "org.typelevel",
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
homepage := Some(url("http://github.com/typelevel/machinist")),
scalaVersion := Scala212,
crossScalaVersions := Seq(Scala211, Scala212, "2.13.0"),
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked"
),
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := Function.const(false),
credentials += Credentials(
Option(System.getProperty("build.publish.credentials")) map (new File(_)) getOrElse (Path.userHome / ".ivy2" / ".credentials")
),
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging),
pomExtra := (
<scm>
<url>[email protected]:typelevel/machinist.git</url>
<connection>scm:git:[email protected]:typelevel/machinist.git</connection>
</scm>
<developers>
<developer>
<id>d_m</id>
<name>Erik Osheim</name>
<url>http://github.com/non/</url>
</developer>
<developer>
<id>tixxit</id>
<name>Tom Switzer</name>
<url>http://github.com/tixxit/</url>
</developer>
</developers>
),
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
releaseStepCommandAndRemaining(s"; ++ ${Scala211} ; machinistNative/publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges))
lazy val noPublish = Seq(
publish := {},
publishLocal := {},
publishArtifact := false)
lazy val root = project
.in(file("."))
.aggregate(machinistJS, machinistJVM)
.settings(name := "machinist-root")
.settings(machinistSettings: _*)
.settings(noPublish: _*)
lazy val machinist = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("."))
.settings(name := "machinist")
.settings(machinistSettings: _*)
.nativeSettings(
scalaVersion := Scala211,
crossScalaVersions := Seq(Scala211)
)
lazy val machinistJVM = machinist.jvm
lazy val machinistJS = machinist.js
lazy val machinistNative = machinist.native