forked from typelevel/scalacheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
103 lines (75 loc) · 2.89 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
sourceDirectory := file("dummy source directory")
// When bumping to 1.14.1, remember to set mimaPreviousArtifacts to 1.14.0
lazy val versionNumber = "1.14.0"
lazy val isRelease = false
lazy val travisCommit = Option(System.getenv().get("TRAVIS_COMMIT"))
lazy val sharedSettings = MimaSettings.settings ++ Seq(
name := "scalacheck",
version := {
val suffix =
if (isRelease) ""
else travisCommit.map("-" + _.take(7)).getOrElse("") + "-SNAPSHOT"
versionNumber + suffix
},
isSnapshot := !isRelease,
organization := "org.scalacheck",
licenses := Seq("BSD-style" -> url("http://www.opensource.org/licenses/bsd-license.php")),
homepage := Some(url("http://www.scalacheck.org")),
credentials ++= (for {
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
password <- Option(System.getenv().get("SONATYPE_PASSWORD"))
} yield Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
username, password
)).toSeq,
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0-RC2"),
unmanagedSourceDirectories in Compile += (baseDirectory in LocalRootProject).value / "src" / "main" / "scala",
unmanagedSourceDirectories in Test += (baseDirectory in LocalRootProject).value / "src" / "test" / "scala",
resolvers += "sonatype" at "https://oss.sonatype.org/content/repositories/releases",
javacOptions += "-Xmx1024M",
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature"),
scalacOptions in (Compile,doc) += "-Xfatal-warnings",
//mimaPreviousArtifacts := (
// if (CrossVersion isScalaApiCompatible scalaVersion.value)
// Set("org.scalacheck" %%% "scalacheck" % "1.14.0")
// else
// Set.empty
//),
publishTo := {
val nexus = "https://oss.sonatype.org/"
val (name, path) = if (isSnapshot.value) ("snapshots", "content/repositories/snapshots")
else ("releases", "service/local/staging/deploy/maven2")
Some(name at nexus + path)
},
publishMavenStyle := true,
// Travis should only publish snapshots
publishArtifact := !(isRelease && travisCommit.isDefined),
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra := {
<scm>
<url>https://github.com/rickynils/scalacheck</url>
<connection>scm:git:git@github.com:rickynils/scalacheck.git</connection>
</scm>
<developers>
<developer>
<id>rickynils</id>
<name>Rickard Nilsson</name>
</developer>
</developers>
}
)
lazy val js = project.in(file("js"))
.settings(sharedSettings: _*)
.settings(
scalaJSStage in Global := FastOptStage,
libraryDependencies += "org.scala-js" %% "scalajs-test-interface" % scalaJSVersion
)
.enablePlugins(ScalaJSPlugin)
lazy val jvm = project.in(file("jvm"))
.settings(sharedSettings: _*)
.settings(
libraryDependencies += "org.scala-sbt" % "test-interface" % "1.0"
)