-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
build.sbt
106 lines (95 loc) · 3.24 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
104
105
106
val flywayPlayVersion = "9.1.0"
val scalaVersion_2_13 = "2.13.15"
val scalaVersion_3 = "3.3.4"
val defaultFlywayVersion = "9.16.0"
val flywayVersion = sys.env.getOrElse("FLYWAY_PLAY_FLYWAY_VERSION", defaultFlywayVersion)
val scalikejdbcVersion = "4.3.2"
val scalatest = "org.scalatest" %% "scalatest" % "3.2.19" % "test"
lazy val commonSettings = Seq(
organization := "org.flywaydb",
scalaVersion := scalaVersion_2_13,
crossScalaVersions := Seq(scalaVersion_2_13, scalaVersion_3),
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
)
lazy val `flyway-play` = project
.in(file("."))
.settings(commonSettings)
.settings(nonPublishingSettings)
.aggregate(plugin, playapp)
lazy val plugin = project
.in(file("plugin"))
.enablePlugins(SbtTwirl)
.settings(commonSettings)
.settings(publishingSettings)
.settings(
name := "flyway-play",
version := flywayPlayVersion,
libraryDependencies ++= Seq(
"org.playframework" %% "play" % play.core.PlayVersion.current % "provided",
"org.playframework" %% "play-test" % play.core.PlayVersion.current % "test"
excludeAll ExclusionRule(organization = "org.specs2"),
"org.flywaydb" % "flyway-core" % flywayVersion,
scalatest
),
scalacOptions ++= Seq("-language:_", "-deprecation")
)
val playAppName = "playapp"
val playAppVersion = "1.0-SNAPSHOT"
lazy val playapp = project
.in(file("playapp"))
.enablePlugins(PlayScala)
.settings(commonSettings)
.settings(nonPublishingSettings)
.settings(
Test / resourceDirectories += baseDirectory.value / "conf",
version := playAppVersion,
libraryDependencies ++= Seq(
guice,
"com.h2database" % "h2" % "2.3.232",
"postgresql" % "postgresql" % "9.1-901-1.jdbc4",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.17.2",
"org.playframework" %% "play-test" % play.core.PlayVersion.current % "test"
excludeAll ExclusionRule(organization = "org.specs2"),
"org.scalikejdbc" %% "scalikejdbc" % scalikejdbcVersion % "test",
"org.scalikejdbc" %% "scalikejdbc-config" % scalikejdbcVersion % "test",
scalatest
)
)
.dependsOn(plugin)
.aggregate(plugin)
val publishingSettings = Seq(
publishMavenStyle := true,
Test / publishArtifact := false,
pomExtra :=
<url>https://github.com/flyway/flyway-play</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://github.com/flyway/flyway-play/blob/master/LICENSE.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:flyway/flyway-play.git</url>
<connection>scm:git:[email protected]:flyway/flyway-play.git</connection>
</scm>
<developers>
<developer>
<id>tototoshi</id>
<name>Toshiyuki Takahashi</name>
<url>https://tototoshi.github.io</url>
</developer>
</developers>
)
val nonPublishingSettings = Seq(
publishArtifact := false,
publish := {},
publishLocal := {},
Test / parallelExecution := false
)