-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
71 lines (65 loc) · 3.05 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
import Dependencies._
import com.typesafe.tools.mima.core._, ProblemFilters._
def baseVersion: String = "1.1.0"
def commonSettings: Seq[Setting[_]] = Seq(
scalaVersion := scala212,
javacOptions in compile ++= Seq("-Xlint", "-Xlint:-serial"),
crossScalaVersions := Seq(scala210, scala211, scala212, scala213),
)
lazy val ioRoot = (project in file("."))
.aggregate(io)
.settings(
inThisBuild(
Seq(
git.baseVersion := baseVersion,
bintrayPackage := "io",
homepage := Some(url("https://github.com/sbt/io")),
description := "IO module for sbt",
scmInfo := Some(ScmInfo(url("https://github.com/sbt/io"), "git@github.com:sbt/io.git")),
scalafmtOnCompile in Sbt := false,
)),
commonSettings,
name := "IO Root",
skip in publish := true
)
// Path, IO (formerly FileUtilities), NameFilter and other I/O utility classes
val io = (project in file("io"))
.enablePlugins(ContrabandPlugin)
.settings(
commonSettings,
name := "IO",
libraryDependencies ++= Seq(scalaCompiler.value % Test, scalaCheck % Test, scalatest % Test),
libraryDependencies ++= Seq(jna, jnaPlatform),
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
initialCommands in console += "\nimport sbt.io._, syntax._",
mimaPreviousArtifacts := (CrossVersion partialVersion scalaVersion.value match {
case Some((2, n)) if n >= 13 => Set.empty
case _ =>
Set(
"1.0.0", "1.0.1", "1.0.2",
"1.1.0", "1.1.1", "1.1.2",
) map (version => organization.value %% moduleName.value % version)
}),
mimaBinaryIssueFilters ++= Seq(
// MiMa doesn't treat effectively final members as final
// WORKAROUND typesafehub/migration-manager#162
exclude[FinalMethodProblem]("sbt.io.SimpleFilter.accept"),
exclude[FinalMethodProblem]("sbt.io.SimpleFileFilter.accept"),
// MiMa doesn't understand private inner classes?
// method this(sbt.io.PollingWatchService,sbt.io.PollingWatchService#PollingThread,java.nio.file.Watchable,java.util.List)Unit in class sbt.io.PollingWatchService#PollingWatchKey does not have a correspondent in current version
exclude[DirectMissingMethodProblem]("sbt.io.PollingWatchService#PollingWatchKey.this"),
),
BuildInfoPlugin.buildInfoDefaultSettings, // avoids BuildInfo generated in Compile scope
addBuildInfoToConfig(Test),
buildInfoKeys in Test := Seq[BuildInfoKey](target),
buildInfoPackage in Test := "sbt.internal.io",
buildInfoUsePackageAsPath in Test := true,
)
inThisBuild(Seq(
whitesourceProduct := "Lightbend Reactive Platform",
whitesourceAggregateProjectName := "sbt-io-master",
whitesourceAggregateProjectToken := "460d23766d364910a7c6f8f330f55aea651a3d13b4a94809b79bb6fb63c761ea",
whitesourceIgnoredScopes += "scalafmt",
whitesourceFailOnError := sys.env.contains("WHITESOURCE_PASSWORD"), // fail if pwd is present
whitesourceForceCheckAllDependencies := true,
))