-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
60 lines (55 loc) · 1.78 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
import Dependencies._
name := "Scala-nanoid project"
val sharedSettings = Seq(
name := "scala-nanoid",
version := "0.1-SNAPSHOT",
scalaVersion := "2.12.3",
organization := "com.github.ssnickolay",
publishMavenStyle := true,
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.6"),
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomIncludeRepository := { _ => false },
licenses := Seq("BSD-style" -> url("http://www.opensource.org/licenses/bsd-license.php")),
scmInfo := Some(
ScmInfo(
url("https://github.com/ssnickolay"),
"scm:[email protected]:ssnickolay/scala-nanoid.git"
)
),
developers := List(
Developer(
id = "ssnickolay",
name = "Sverchkov Nikolay",
email = "[email protected]",
url = url("https://github.com/ssnickolay")
)
)
)
lazy val root = project.in(file(".")).
aggregate(nanoidJS, nanoidJVM).
settings(
publish := {},
publishLocal := {}
)
lazy val nanoid = crossProject.in(file(".")).
settings(sharedSettings).
jvmSettings(
// Add JVM-specific settings here
libraryDependencies += "org.scalactic" %%% "scalactic" % scalactic,
libraryDependencies += "org.scalatest" %%% "scalatest" % scalatest % Test
).
jsSettings(
// Add JS-specific settings here
scalacOptions += "-P:scalajs:sjsDefinedByDefault",
libraryDependencies += "org.scalactic" %%% "scalactic" % scalactic,
libraryDependencies += "org.scalatest" %%% "scalatest" % scalatest % Test
)
lazy val nanoidJVM = nanoid.jvm
lazy val nanoidJS = nanoid.js