-
-
Notifications
You must be signed in to change notification settings - Fork 283
/
Copy pathbuild.sbt
89 lines (78 loc) · 2.97 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
import scala.sys.process._
import com.typesafe.tools.mima.plugin.MimaPlugin._
import com.typesafe.tools.mima.core._
ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("releases")
// Customise sbt-dynver's behaviour to make it work with tags which aren't v-prefixed
ThisBuild / dynverVTagPrefix := false
// Sanity-check: assert that version comes from a tag (e.g. not a too-shallow clone)
// https://github.com/dwijnand/sbt-dynver/#sanity-checking-the-version
Global / onLoad := (Global / onLoad).value.andThen { s =>
dynverAssertTagVersion.value
s
}
lazy val commonSettings = Seq(
organization := "org.playframework",
organizationName := "The Play Framework Project",
organizationHomepage := Some(url("https://playframework.com/")),
homepage := Some(url(s"https://github.com/playframework/${Common.repoName}")),
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")),
javacOptions ++= Seq("-encoding", "UTF-8", "-Xlint:-options"),
compile / javacOptions ++= Seq("--release", "17"),
doc / javacOptions := Seq("-source", "17"),
scalaVersion := "2.13.16",
crossScalaVersions := Seq("2.13.16", "3.3.4"),
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-encoding", "utf8") ++
(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Seq("-Xsource:3")
case _ => Seq.empty
}),
developers += Developer(
"playframework",
"The Play Framework Contributors",
url("https://github.com/playframework")
),
pomIncludeRepository := { _ => false }
)
lazy val `play-slick-root` = (project in file("."))
.aggregate(
`play-slick`,
`play-slick-evolutions`
)
.settings(commonSettings)
.settings(
publish / skip := true
)
lazy val `play-slick` = (project in file("src/core"))
.enablePlugins(Omnidoc, Playdoc, MimaPlugin)
.configs(Docs)
.settings(libraryDependencies ++= Dependencies.core)
.settings(mimaSettings)
.settings(
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[MissingTypesProblem]("play.api.db.slick.NamedDatabaseConfigProvider"),
)
)
.settings(commonSettings)
lazy val `play-slick-evolutions` = (project in file("src/evolutions"))
.enablePlugins(Omnidoc, Playdoc, MimaPlugin)
.configs(Docs)
.settings(libraryDependencies ++= Dependencies.evolutions)
.settings(mimaSettings)
.settings(commonSettings)
.dependsOn(`play-slick` % "compile;test->test")
lazy val docs = project
.in(file("docs"))
.enablePlugins(PlayDocsPlugin)
.configs(Docs)
.dependsOn(`play-slick`)
.dependsOn(`play-slick-evolutions`)
.settings(commonSettings)
// Binary compatibility is tested against this version
val previousVersion: Option[String] = Some("6.1.0")
ThisBuild / mimaFailOnNoPrevious := false
def mimaSettings = Seq(
mimaPreviousArtifacts := previousVersion.map(organization.value %% moduleName.value % _).toSet,
mimaBinaryIssueFilters := Seq(
)
)