forked from softwaremill/quicklens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
72 lines (67 loc) · 2.44 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
import org.scalajs.sbtplugin.ScalaJSPlugin.AutoImport.crossProject
import org.scalajs.sbtplugin.cross.CrossType
val buildSettings = Defaults.coreDefaultSettings ++ Seq(
organization := "com.softwaremill.quicklens",
scalaVersion := "2.12.8",
crossScalaVersions := Seq(scalaVersion.value, "2.11.12"),
scalacOptions := Seq("-deprecation", "-feature", "-unchecked"),
scalafmtOnCompile := true,
scalafmtVersion := "1.1.0",
// Sonatype OSS deployment
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ =>
false
},
developers := List(
Developer("adamw",
"Adam Warski",
url("http://www.warski.org"))
),
scmInfo := Some(
ScmInfo(browseUrl = url("https://github.com/adamw/quicklens"),
connection = "scm:git:[email protected]:adamw/quicklens.git")
),
licenses := Seq(
"Apache2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("http://www.softwaremill.com")),
sonatypeProfileName := "com.softwaremill",
// sbt-release
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseIgnoreUntrackedFiles := true,
releaseProcess := QuicklensRelease.steps
)
lazy val root =
(project in file("."))
.settings(buildSettings ++ Seq(publishArtifact := false))
.aggregate(quicklensJVM, quicklensJS, tests)
lazy val quicklens =
(crossProject.crossType(CrossType.Pure) in file("quicklens"))
.settings(buildSettings ++ Seq(
name := "quicklens",
libraryDependencies += ("org.scala-lang" % "scala-reflect" % scalaVersion.value)))
lazy val quicklensJVM = quicklens.jvm
lazy val quicklensJS = quicklens.js
lazy val tests: Project =
(project in file("tests"))
.settings(
buildSettings ++
Seq(
publishArtifact := false,
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.4" % "test",
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "test"),
// Otherwise when running tests in sbt, the macro is not visible
// (both macro and usages are compiled in the same compiler run)
fork in Test := true
))
.dependsOn(quicklensJVM)