This repository has been archived by the owner on Dec 8, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
104 lines (97 loc) · 2.92 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
95
96
97
98
99
100
101
102
103
import ReleaseTransformations._
import sbt.Keys.mappings
import sbt._
val SCALA_2_12 = "2.12.1"
val SCALA_2_11 = "2.11.8"
scalaVersion in Global := SCALA_2_12
val buildSettings = Seq[Setting[_]](
scalaVersion := SCALA_2_12,
crossScalaVersions := Seq(SCALA_2_12, SCALA_2_11),
organization := "org.wvlet",
crossPaths := true,
publishMavenStyle := true,
// For performance testing, ensure each test run one-by-one
concurrentRestrictions in Global := Seq(Tags.limit(Tags.Test, 1)),
scalacOptions ++= Seq("-feature", "-deprecation"),
logBuffered in Test := false,
incOptions := incOptions.value
.withNameHashing(true)
// Suppress macro recompile warning: https://github.com/sbt/sbt/issues/2654
.withLogRecompileOnMacro(false),
updateOptions := updateOptions.value.withCachedResolution(true),
sonatypeProfileName := "org.wvlet",
pomExtra := {
<url>https://github.com/xerial/wvlet</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:github.com/wvlet/log.git</connection>
<developerConnection>scm:git:[email protected]:wvlet/log.git</developerConnection>
<url>github.com/wvlet/wvlet.git</url>
</scm>
<developers>
<developer>
<id>leo</id>
<name>Taro L. Saito</name>
<url>http://xerial.org/leo</url>
</developer>
</developers>
},
// Use sonatype resolvers
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
),
// Release settings
releaseCrossBuild := true,
releaseTagName := { (version in ThisBuild).value },
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _), enableCrossBuild = true),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _), enableCrossBuild = true),
pushChanges
)
)
lazy val root = Project(id = "wvlet-log-root", base = file("."))
.settings(
buildSettings,
publishArtifact := false,
publish := {},
publishLocal := {}
) aggregate(logJVM, logJS)
lazy val log =
crossProject
.in(file("wvlet-log"))
.settings(buildSettings)
.settings(
name := "wvlet-log",
description := "Fancy logger for Scala",
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided",
"org.scalatest" %%% "scalatest" % "3.0.1" % "test"
)
)
.jvmSettings(
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-core" % "1.1.7"
)
)
.jsSettings(
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-java-logging" % "0.1.1"
)
)
lazy val logJVM = log.jvm
lazy val logJS = log.js