-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
build.sbt
96 lines (90 loc) · 3.03 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
val appName = "play2-memcached-" + playShortName
val appVersion = "0.12.0-SNAPSHOT"
val spymemcached = "net.spy" % "spymemcached" % "2.12.3"
val h2databaseTest = "com.h2database" % "h2" % "2.2.224" % Test
lazy val baseSettings = Seq(
scalaVersion := "2.13.12",
crossScalaVersions := Seq("2.13.12", "3.3.1"),
Test / parallelExecution := false
)
def playShortName: String = {
val version = play.core.PlayVersion.current
val majorMinor = version.split("""\.""").take(2).mkString("")
s"play$majorMinor"
}
lazy val root = Project("root", base = file("."))
.settings(baseSettings: _*)
.settings(
publishLocal := {},
publish := {}
).aggregate(plugin, scalaSample, javaSample)
lazy val plugin = Project(appName, base = file("plugin"))
.settings(baseSettings: _*)
.settings(
libraryDependencies += h2databaseTest,
libraryDependencies += spymemcached,
libraryDependencies += playCore % Provided,
libraryDependencies += cacheApi % Provided,
libraryDependencies += specs2 % Test,
organization := "com.github.mumoshu",
version := appVersion,
//scalacOptions += "-deprecation",
publishTo := {
val v = version.value
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")
},
publishMavenStyle := true,
Test / publishArtifact := false,
pomIncludeRepository := { _ => false },
pomExtra := (
<url>https://github.com/mumoshu/play2-memcached</url>
<licenses>
<license>
<name>BSD-style</name>
<url>http://www.opensource.org/licenses/bsd-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>git@github.com:mumoshu/play2-memcached.git</url>
<connection>scm:git:git@github.com:mumoshu/play2-memcached.git</connection>
</scm>
<developers>
<developer>
<id>you</id>
<name>KUOKA Yusuke</name>
<url>https://github.com/mumoshu</url>
</developer>
</developers>
),
Compile/ unmanagedSourceDirectories := {
(Compile / unmanagedSourceDirectories).value ++ Seq((Compile / sourceDirectory).value)
},
Test / unmanagedSourceDirectories := {
(Test / unmanagedSourceDirectories).value ++ Seq((Test / sourceDirectory).value)
}
)
lazy val scalaSample = Project(
"scala-sample",
file("samples/scala")
).enablePlugins(PlayScala)
.settings(baseSettings: _*)
.settings(
libraryDependencies += cacheApi,
libraryDependencies += h2databaseTest,
publishLocal := {},
publish := {}
).dependsOn(plugin)
lazy val javaSample = Project(
"java-sample",
file("samples/java")
).enablePlugins(PlayJava)
.settings(baseSettings: _*)
.settings(
libraryDependencies += cacheApi,
libraryDependencies += h2databaseTest,
publishLocal := {},
publish := {}
).dependsOn(plugin)