-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.sbt
72 lines (66 loc) · 2.19 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
scalariformSettings
lazy val plugin = Project (
id = "plugin",
base = file ("plugin")
).settings(
Seq(
name := "play-scalate",
organization := "com.github.tototoshi",
version := "0.3.0",
scalaVersion := "2.11.8",
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play" % play.core.PlayVersion.current % "provided",
"org.scalatra.scalate" %% "scalate-core" % "1.8.0" % "provided"
),
scalacOptions ++= Seq("-language:_", "-deprecation")
) ++ scalariformSettings ++ publishingSettings :_*
)
val playAppName = "playapp"
val playAppVersion = "1.0-SNAPSHOT"
lazy val playapp = Project(
playAppName,
file("playapp")
).enablePlugins(PlayScala).settings(scalariformSettings:_*)
.settings(
resourceDirectories in Test += baseDirectory.value / "conf",
scalaVersion := "2.11.8",
version := playAppVersion,
libraryDependencies ++= Seq(
"org.scalatra.scalate" %% "scalate-core" % "1.8.0",
"org.scala-lang" % "scala-compiler" % scalaVersion.value
),
unmanagedResourceDirectories in Compile += baseDirectory.value / "app" / "views"
)
.dependsOn(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>http://github.com/scalate/play-scalate</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://github.com/scalate/play-scalate/blob/master/LICENSE.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:scalate/play-scalate.git</url>
<connection>scm:git:[email protected]:scalate/play-scalate.git</connection>
</scm>
<developers>
<developer>
<id>tototoshi</id>
<name>Toshiyuki Takahashi</name>
<url>http://tototoshi.github.com</url>
</developer>
</developers>