-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
127 lines (113 loc) · 3.94 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
scalaVersion := "2.12.7"
val _version = "0.2.0"
val _crossScalaVersions = Seq("2.12.7", "2.11.12")
val _org = "jp.t2v"
lazy val _publishMavenStyle = true
lazy val _publishArtifactInTest = false
lazy val _pomIncludeRepository = { _: MavenRepository => false }
lazy val _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")
}
lazy val _pomExtra = {
<url>https://github.com/gakuzzzz/play2-pager</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:gakuzzzz/play2-pager.git</url>
<connection>scm:git:[email protected]:gakuzzzz/play2-pager.git</connection>
</scm>
<developers>
<developer>
<id>gakuzzzz</id>
<name>gakuzzzz</name>
<url>https://github.com/gakuzzzz</url>
</developer>
</developers>
}
lazy val _playVersion = play.core.PlayVersion.current
lazy val root = (project in file(".")).
aggregate(core, scalikejdbc, sample).
settings(
aggregate in update := false,
crossScalaVersions := _crossScalaVersions,
publish := { },
publishArtifact := false,
packagedArtifacts := Map.empty,
publishTo := _publishTo(_version),
pomExtra := _pomExtra
)
lazy val commonSettings = Seq(
organization := _org,
name := "play2-pager",
version := _version,
scalaVersion := "2.12.7",
crossScalaVersions := _crossScalaVersions,
publishMavenStyle := _publishMavenStyle,
publishArtifact in Test := _publishArtifactInTest,
pomIncludeRepository := _pomIncludeRepository,
publishTo := _publishTo(_version),
pomExtra := _pomExtra
)
lazy val core = (project in file("core")).
enablePlugins(SbtTwirl).
settings(
commonSettings,
name := "play2-pager",
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play" % _playVersion % "provided"
),
TwirlKeys.templateImports ++= Seq(
"jp.t2v.lab.play2.pager._"
)
)
lazy val scalikejdbc = (project in file("scalikejdbc")).
dependsOn(core).
settings(
commonSettings,
name := "play2-pager-scalikejdbc",
libraryDependencies ++= Seq(
"org.scalikejdbc" %% "scalikejdbc" % "3.1.+" % "provided"
)
)
lazy val sample = (project in file("sample")).
dependsOn(core, scalikejdbc).
enablePlugins(PlayScala).
settings(
commonSettings,
name := "play2-pager-sample",
libraryDependencies ++= Seq(
"com.h2database" % "h2" % "1.4.+",
"ch.qos.logback" % "logback-classic" % "1.2.+",
"org.scalikejdbc" %% "scalikejdbc" % "3.1.+",
"org.scalikejdbc" %% "scalikejdbc-config" % "3.1.+",
"org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.6.0-scalikejdbc-3.1",
"org.scalikejdbc" %% "scalikejdbc-syntax-support-macro" % "3.1.+",
guice,
"org.flywaydb" %% "flyway-play" % "4.0.0",
"net.sourceforge.htmlunit" % "htmlunit" % "2.14" % "test",
"org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % "test"
),
routesImport ++= Seq(
"jp.t2v.lab.play2.pager.Pager",
"jp.t2v.lab.play2.pager.Bindables._",
"models.account._"
),
TwirlKeys.templateImports ++= Seq(
"jp.t2v.lab.play2.pager._",
"models.account._"
),
publish := { },
publishArtifact := false,
packagedArtifacts := Map.empty,
publishTo := _publishTo(_version),
pomExtra := _pomExtra
)