forked from playframework/play-soap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
83 lines (75 loc) · 2.39 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
/*
* Copyright (C) 2015-2017 Lightbend Inc. <https://www.lightbend.com>
*/
lazy val root = project
.in(file("."))
.enablePlugins(PlayRootProject)
.aggregate(client)
.settings(
name := "play-soap-root",
releaseCrossBuild := false
)
lazy val client = project
.in(file("client"))
.enablePlugins(PlayLibrary)
.settings(
name := "play-soap-client",
libraryDependencies ++= Common.clientDeps,
resolvers += "Scalaz Bintray Repo" at "https://dl.bintray.com/scalaz/releases",
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
)
lazy val plugin = project
.in(file("sbt-plugin"))
.enablePlugins(PlaySbtPlugin)
.settings(
name := "sbt-play-soap",
organization := "com.typesafe.sbt",
libraryDependencies ++= Common.pluginDeps,
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % Common.PlayVersion),
resourceGenerators in Compile += generateVersionFile.taskValue,
scriptedLaunchOpts ++= Seq(
s"-Dscala.version=2.11.11",
s"-Dproject.version=${version.value}",
s"-Dcxf.version=${Common.CxfVersion}",
s"-Dplay.version=${Common.PlayVersion}"
),
scriptedDependencies := {
val () = publishLocal.value
val () = (publishLocal in client).value
}
)
lazy val docs = (project in file("docs"))
.enablePlugins(SbtTwirl)
.enablePlugins(SbtWeb)
.enablePlugins(PlayNoPublish)
.settings(
scalaVersion := "2.11.11",
crossScalaVersions := Seq("2.11.11"),
WebKeys.pipeline ++= {
val clientDocs = (mappings in (Compile, packageDoc) in client).value.map {
case (file, _name) => file -> ("api/client/" + _name)
}
val pluginDocs = (mappings in (Compile, packageDoc) in plugin).value.map {
case (file, _name) => file -> ("api/sbtwsdl/" + _name)
}
clientDocs ++ pluginDocs
}
)
def generateVersionFile = Def.task {
val clientVersion = (version in client).value
val pluginVersion = version.value
val file = (resourceManaged in Compile).value / "play-soap.version.properties"
val content =
s"""play-soap-client.version=$clientVersion
|sbt-play-soap.version=$pluginVersion
""".stripMargin
if (!file.exists() || !(IO.read(file) == content)) {
IO.write(file, content)
}
Seq(file)
}
lazy val scriptedTask = TaskKey[Unit]("scripted-task")
playBuildRepoName in ThisBuild := "play-soap"
playBuildExtraPublish := {
(PgpKeys.publishSigned in plugin).value
}