forked from playframework/flyway-play
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
86 lines (77 loc) · 2.66 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
scalariformSettings
val flywayPlayVersion = "2.1.0-SNAPSHOT"
val scalatest = "org.scalatest" %% "scalatest" % "2.1.5" % "test"
lazy val plugin = Project (
id = "plugin",
base = file ("plugin")
).settings(
Seq(
name := "flyway-play",
organization := "org.flywaydb",
version := flywayPlayVersion,
scalaVersion := "2.10.5",
crossScalaVersions := scalaVersion.value :: "2.11.6" :: Nil,
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play" % play.core.PlayVersion.current % "provided",
"com.typesafe.play" %% "play-test" % play.core.PlayVersion.current % "test"
excludeAll(ExclusionRule(organization = "org.specs2")),
"org.flywaydb" % "flyway-core" % "3.1",
scalatest
),
scalacOptions ++= Seq("-language:_", "-deprecation")
) ++ scalariformSettings ++ publishingSettings :_*
)
val appDependencies = Seq(
"com.h2database" % "h2" % "[1.3,)",
"postgresql" % "postgresql" % "9.1-901.jdbc4",
"com.typesafe.play" %% "play-test" % play.core.PlayVersion.current % "test"
excludeAll(ExclusionRule(organization = "org.specs2")),
"org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.4.0-M2-20141215",
scalatest
)
val playAppName = "playapp"
val playAppVersion = "1.0-SNAPSHOT"
lazy val playapp = Project(
playAppName,
file("playapp")
).enablePlugins(play.PlayScala).settings(scalariformSettings:_*)
.settings(
resourceDirectories in Test += baseDirectory.value / "conf",
scalaVersion := "2.10.5",
version := playAppVersion,
libraryDependencies ++= appDependencies
)
.dependsOn(plugin)
.aggregate(plugin)
val publishingSettings = Seq(
publishMavenStyle := true,
publishTo <<= version { (v: String) => _publishTo(v) },
publishArtifact in Test := false,
pomExtra := _pomExtra
)
def _publishTo(v: String) = {
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
val _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>http://tototoshi.github.com</url>
</developer>
</developers>