This repository has been archived by the owner on Jul 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
79 lines (72 loc) · 2.6 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
import sbt.url
import sbtrelease.ReleaseStateTransformations._
val scalaV = "2.12.6"
scalacOptions += "-P:scalajs:sjsDefinedByDefault"
lazy val common = Seq(
name := "pages",
organization := "com.flowtick",
scalaVersion := scalaV,
crossScalaVersions := Seq(scalaV, "2.11.11"),
publishConfiguration := publishConfiguration.value.withOverwrite(true),
com.typesafe.sbt.pgp.PgpKeys.publishSignedConfiguration := com.typesafe.sbt.pgp.PgpKeys.publishSignedConfiguration.value
.withOverwrite(true),
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true),
com.typesafe.sbt.pgp.PgpKeys.publishLocalSignedConfiguration := com.typesafe.sbt.pgp.PgpKeys.publishLocalSignedConfiguration.value
.withOverwrite(true),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseCrossBuild := true,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
releaseStepCommandAndRemaining("sonatypeReleaseAll"),
pushChanges
),
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
publishMavenStyle := true,
licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://github.com/flowtick/pages")),
scmInfo := Some(
ScmInfo(
url("https://github.com/flowtick/pages.git"),
"scm:[email protected]:flowtick/pages.git"
)
),
developers := List(
Developer(id = "adrobisch", name = "Andreas Drobisch", email = "[email protected]", url = url("http://drobisch.com/"))
)
)
lazy val root = project.in(file(".")).
settings(common).
aggregate(pagesJS, pagesJVM).
settings(
publish := {},
publishLocal := {},
PgpKeys.publishSigned := {}
)
lazy val pages = crossProject.in(file(".")).
settings(common).
settings(
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.3" % Test
)
lazy val pagesJS = pages.js.settings(
resolvers += Resolver.bintrayRepo("flowtick", "scala-xml"),
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "0.9.3" % Provided,
libraryDependencies += "com.flowtick" %%% "scala-xml" % "1.1.0-ft" % Provided,
libraryDependencies += "in.nvilla" %%% "monadic-html" % "0.3.2" % Test,
artifactPath in (Compile, fastOptJS) := baseDirectory.value / ".." / "dist" / "pages.js",
artifactPath in (Compile, fullOptJS) := (artifactPath in (Compile, fastOptJS)).value
)
lazy val pagesJVM = pages.jvm