Skip to content

Commit f577ef3

Browse files
committed
Update to SBT 0.13.7
1 parent 6b07b80 commit f577ef3

File tree

8 files changed

+42
-44
lines changed

8 files changed

+42
-44
lines changed

project/Build.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ import com.earldouglas.xsbtwebplugin._
2929
import WebappPlugin._
3030
import Distributor.{ Keys => DistribKeys, distribSettings }
3131
import DependencyFetcher.dependencyFetcherSettings
32-
import sbtassembly.Plugin._
33-
import AssemblyKeys._
32+
import sbtassembly.AssemblyPlugin._
33+
import sbtassembly.AssemblyKeys._
3434

3535
object BuildDef extends Build with VersionSystem {
3636

3737
lazy val liftDependencies = Seq(lift_webkit, servletApi, logback, slf4j)
3838
lazy val testDependencies = Seq(junit, specs, scalatest)
3939
lazy val libDependencies = Seq(akka, reactive, commons.io, concLinkedHashMap, juniversalchardet, dependencyCheckCore) ++ asm ++ jackson ++ jna
4040
lazy val dbDependencies = Seq(slick, h2)
41-
41+
4242
val baseCompilerSettings = Seq(
4343
scalacOptions := List("-deprecation", "-unchecked", "-feature", "-target:jvm-1.6"),
4444
scalaVersion := "2.10.4"
@@ -49,16 +49,16 @@ object BuildDef extends Build with VersionSystem {
4949
version := "1.1.1",
5050
releaseDate := "5/28/2014"
5151
)
52-
52+
5353
val webappProjectSettings = WebPlugin.webSettings ++ Seq (
5454
libraryDependencies ++= Seq(jettyWebapp, jettyOrbit)
5555
)
5656

5757
val Bytefrog = file("bytefrog")
5858
lazy val BytefrogAgent = ProjectRef(Bytefrog, "Agent")
5959
lazy val BytefrogHQ = ProjectRef(Bytefrog, "HQ")
60-
61-
/* This project contains the main application's source code (Lift App).
60+
61+
/* This project contains the main application's source code (Lift App).
6262
*/
6363
lazy val Core = Project("CodePulse", file("codepulse"))
6464
.dependsOn(BytefrogHQ)
@@ -75,4 +75,6 @@ object BuildDef extends Build with VersionSystem {
7575
libraryDependencies ++= libDependencies,
7676
libraryDependencies ++= dbDependencies
7777
)
78+
79+
lazy val root = Project("root", file(".")).aggregate(Core)
7880
}

project/DependencyFetcher.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ object DependencyFetcher extends BuildExtra {
249249
}
250250

251251
object Settings {
252-
def fetchDependenciesTask(dependencyList: TaskKey[Seq[Dependency]]): Initialize[Task[Unit]] = (dependencyList in Dependencies, streams) map { (deps, streams) =>
252+
def fetchDependenciesTask(dependencyList: TaskKey[Seq[Dependency]]): Def.Initialize[Task[Unit]] = (dependencyList in Dependencies, streams) map { (deps, streams) =>
253253
val log = streams.log
254254

255255
deps foreach {

project/Distributor.scala

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ import com.earldouglas.xsbtwebplugin.PluginKeys._
2525
import sbt.classpath.ClasspathUtilities
2626
import Project.Initialize
2727

28-
import sbtassembly.Plugin.AssemblyKeys.assembly
28+
import sbtassembly.AssemblyKeys.assembly
2929

3030
import java.nio.file.{ Files, StandardCopyOption }
3131

3232
import com.avi.sbt.betterzip.BetterZip.{ Entry => ZipEntry, _ }
3333

3434
/** In charge of packaging up the node-webkit packages for distribution.
35-
*
35+
*
3636
* @author robertf
3737
*/
3838
object Distributor extends BuildExtra {
@@ -44,7 +44,7 @@ object Distributor extends BuildExtra {
4444

4545
val rootZipFolder = SettingKey[String]("root-zip-folder")
4646
val webappFolder = SettingKey[String]("webapp-folder")
47-
47+
4848
val distCommon = SettingKey[File]("dist-common")
4949
val distJettyConf = SettingKey[File]("dist-jetty-conf")
5050

@@ -57,20 +57,20 @@ object Distributor extends BuildExtra {
5757
}
5858

5959
import Keys._
60-
60+
6161
object Settings {
6262

6363
/** Each task of this type generates a listing of File->Path, where the File is
6464
* a file in the filesystem that will be packaged in a zip/war/jar, and the Path
6565
* is that file's path once it is packaged.
6666
*/
67-
type FileMappingTask = Initialize[Task[Seq[(ZipEntry)]]]
67+
type FileMappingTask = Def.Initialize[Task[Seq[(ZipEntry)]]]
6868

6969
def embeddedWar(conf: Configuration): FileMappingTask = (packageWar in conf, webappFolder in Distribution) map { (war, path) =>
7070
Seq(war -> (path + "webapps/root.war"))
7171
}
7272

73-
def webappClassesTask: Initialize[Task[Seq[(File, String)]]] = (warContents in Distribution) map { (contents) =>
73+
def webappClassesTask: Def.Initialize[Task[Seq[(File, String)]]] = (warContents in Distribution) map { (contents) =>
7474
val classPath = """WEB-INF[\\/]classes[\\/](.*)""".r
7575

7676
contents flatMap {
@@ -82,7 +82,7 @@ object Distributor extends BuildExtra {
8282
}
8383
}
8484

85-
def buildJarTask: Initialize[Task[File]] = (webappClasses in Distribution, crossTarget, name, version) map { (classes, ct, name, version) =>
85+
def buildJarTask: Def.Initialize[Task[File]] = (webappClasses in Distribution, crossTarget, name, version) map { (classes, ct, name, version) =>
8686
val jarToMake = ct / (name + '-' + version + "-webapp-classes.jar")
8787
IO.jar(classes, jarToMake, new java.util.jar.Manifest)
8888
jarToMake
@@ -100,36 +100,36 @@ object Distributor extends BuildExtra {
100100
})
101101
}
102102

103-
def jettyDist(platform: String): FileMappingTask = (jetty in Dependencies, distJettyConf in Distribution, rootZipFolder in Distribution, webappFolder in Distribution) map { (jetty, confDir, rootZipFolder, webappFolder) =>
103+
def jettyDist(platform: String): FileMappingTask = (jetty in Dependencies, distJettyConf in Distribution, rootZipFolder in Distribution, webappFolder in Distribution) map { (jetty, confDir, rootZipFolder, webappFolder) =>
104104
if (!jetty.exists)
105105
sys.error("Missing jetty. Please run `fetch-package-dependencies` or download and place in " + jetty + ".")
106106

107107
val jettyExclusions = List(
108108
"demo-base/", "etc/", "start.d/", "start.ini"
109109
).map(webappFolder + _)
110110

111-
val jettyFiles = jetty.*** x rebase(jetty, webappFolder) map {
111+
val jettyFiles = jetty.*** pair rebase(jetty, webappFolder) map {
112112
// replace \ in paths with /, for easier matching below
113113
case (src, dest) => (src, dest.replace('\\', '/'))
114114
} filter {
115115
case (_, path) if jettyExclusions exists { path startsWith _ } => println("Excluding " + path); false
116116
case _ => true
117117
}
118118

119-
val jettyConf = confDir.*** x rebase(confDir, webappFolder)
119+
val jettyConf = confDir.*** pair rebase(confDir, webappFolder)
120120

121121
appResource(platform, rootZipFolder, jettyFiles ++ jettyConf)
122122
}
123123

124124
def embeddedAppFiles(platform: String): FileMappingTask = (distCommon in Distribution, rootZipFolder in Distribution) map { (appFolder, rootZipFolder) =>
125-
appResource(platform, rootZipFolder, appFolder.*** x rebase(appFolder, rootZipFolder))
125+
appResource(platform, rootZipFolder, appFolder.*** pair rebase(appFolder, rootZipFolder))
126126
}
127127

128128
def nodeWebkitRuntime(platform: String, nwkKey: SettingKey[File]): FileMappingTask = (nwkKey in Dependencies, resourcer in Dependencies, rootZipFolder in Distribution, distCommon in Distribution, target, version) map { (nwk, resourcer, rootZipFolder, appFolder, target, version) =>
129129
if (!nwk.exists)
130130
sys.error("Missing node-webkit for " + platform + ". Please run `fetch-package-dependencies` or download and place in " + nwk + ".")
131131

132-
val nwkFiles: Seq[ZipEntry] = nwk.*** x rebase(nwk, rootZipFolder) map {
132+
val nwkFiles: Seq[ZipEntry] = nwk.*** pair rebase(nwk, rootZipFolder) map {
133133
// replace \ in paths with /, for easier matching below
134134
case (src, dest) => (src, dest.replace('\\', '/'))
135135
}
@@ -169,7 +169,7 @@ object Distributor extends BuildExtra {
169169
Some(ZipEntry(customizedFile, "codepulse/codepulse.exe", mode))
170170

171171
case e @ ZipEntry(_, path, _) if inclusions contains path => Some(e)
172-
172+
173173
case ZipEntry(_, path, _) if path endsWith "/" => None // silent
174174
case ZipEntry(_, path, _) => println("Excluding " + path); None
175175
}
@@ -217,7 +217,7 @@ object Distributor extends BuildExtra {
217217

218218
case ZipEntry(file, path, mode) if path startsWith "codepulse/node-webkit.app" =>
219219
Some(ZipEntry(file, rewritePath(path), mode))
220-
220+
221221
case ZipEntry(_, path, _) if path endsWith "/" => None // silent
222222
case ZipEntry(_, path, _) => println("Excluding " + path); None
223223
}
@@ -240,7 +240,7 @@ object Distributor extends BuildExtra {
240240
if (!jre.exists)
241241
sys.error("Missing JRE for " + platform + ". Please run `fetch-package-dependencies` or download and place in " + jre + ".")
242242

243-
val jreFiles: Seq[ZipEntry] = appResource(platform, rootZipFolder, jre.*** x rebase(jre, jreDest)) map {
243+
val jreFiles: Seq[ZipEntry] = appResource(platform, rootZipFolder, jre.*** pair rebase(jre, jreDest)) map {
244244
// replace \ in paths with /, for easier matching below
245245
case (src, dest) => (src, dest.replace('\\', '/'))
246246
}
@@ -296,7 +296,7 @@ object Distributor extends BuildExtra {
296296

297297
case e @ ZipEntry(_, path, _) if !(exclusions contains path) && !exclusionDirs.exists(path.startsWith) =>
298298
Some(e)
299-
299+
300300
case ZipEntry(_, path, _) if path endsWith "/" => None // silent
301301
case ZipEntry(_, path, _) => println("Excluding " + path); None
302302
}
@@ -308,7 +308,7 @@ object Distributor extends BuildExtra {
308308
"bin/rmid", "bin/rmiregistry", "bin/tnameserv", "bin/keytool", "bin/policytool", "bin/orbd", "bin/servertool",
309309
"bin/ControlPanel", "bin/javaws",
310310
"lib/javafx.properties", "lib/jfxrt.jar", "lib/security/javafx.policy",
311-
"lib/i386/fxavcodecplugin-52.so", "lib/i386/fxavcodecplugin-53.so", "lib/i386/fxplugins.so", "lib/i386/libglass.so", "lib/i386/libgstplugins-lite.so", "lib/i386/libgstreamer-lite.so", "lib/i386/libjavafx-font.so", "lib/i386/libjavafx-iio.so", "lib/i386/libjfxmedia.so", "lib/i386/libjfxwebkit.so", "lib/i386/libprism-es2.so",
311+
"lib/i386/fxavcodecplugin-52.so", "lib/i386/fxavcodecplugin-53.so", "lib/i386/fxplugins.so", "lib/i386/libglass.so", "lib/i386/libgstplugins-lite.so", "lib/i386/libgstreamer-lite.so", "lib/i386/libjavafx-font.so", "lib/i386/libjavafx-iio.so", "lib/i386/libjfxmedia.so", "lib/i386/libjfxwebkit.so", "lib/i386/libprism-es2.so",
312312
"THIRDPARTYLICENSEREADME-JAVAFX.txt", "Welcome.html"
313313
).map(base + _).toSet
314314

@@ -322,7 +322,7 @@ object Distributor extends BuildExtra {
322322

323323
case e @ ZipEntry(_, path, _) if !(exclusions contains path) && !exclusionDirs.exists(path.startsWith) =>
324324
Some(e)
325-
325+
326326
case ZipEntry(_, path, _) if path endsWith "/" => None // silent
327327
case ZipEntry(_, path, _) => println("Excluding " + path); None
328328
}
@@ -365,18 +365,18 @@ object Distributor extends BuildExtra {
365365
out
366366
}
367367
)}
368-
369-
lazy val distribSettings: Seq[Setting[_]] =
368+
369+
lazy val distribSettings: Seq[Setting[_]] =
370370
Seq(
371371
rootZipFolder in Distribution := "codepulse/",
372372
webappFolder in Distribution <<= (rootZipFolder in Distribution) { _ + "backend/" },
373-
373+
374374
distCommon in Distribution := file("distrib/common"),
375375
distJettyConf in Distribution := file("distrib/jetty-conf"),
376-
376+
377377
webappClasses in Distribution <<= webappClassesTask,
378378
webappClassesJar in Distribution <<= buildJarTask
379-
) ++
379+
) ++
380380
inConfig(DefaultConf) { warContents in Distribution <<= com.earldouglas.xsbtwebplugin.WarPlugin.packageWarTask(DefaultClasspathConf) } ++
381381
packageEmbeddedSettingsIn("win32", nwkWindows, jreWindows, packageEmbeddedWin32)(Compile) ++
382382
packageEmbeddedSettingsIn("osx", nwkOsx, jreOsx, packageEmbeddedOsx)(Compile) ++

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 0.12.4
1+
sbt.version = 0.13.7

project/plugins.sbt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
//webplugin
2-
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.5.0")
1+
// webplugin
2+
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.9.0")
33

4-
//eclipse plugin
5-
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.1")
4+
// sbt-eclipse
5+
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")
66

77
//IntelliJ IDEA plugin
88
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
99

1010
//sbt-dependency-graph
1111
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")
1212

13-
// Resolver for the sbt-assembly plugin
14-
resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
15-
16-
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.5")
13+
// sbt-assembly
14+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.12.0")

project/project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ object PluginDef extends Build {
2626
sbt.Keys.libraryDependencies += "org.apache.commons" % "commons-compress" % "1.6",
2727
sbt.Keys.libraryDependencies += "commons-io" % "commons-io" % "2.1"
2828
)
29-
lazy val betterzipPlugin = file("sbt-betterzip")
29+
lazy val betterzipPlugin = RootProject(file("sbt-betterzip"))
3030
}

project/sbt-betterzip/sbt-betterzip.sbt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ organization := "com.secdec"
44

55
version := "0.1"
66

7-
scalaVersion := "2.9.2"
8-
9-
crossScalaVersions := Seq("2.9.1", "2.9.2")
10-
117
sbtPlugin := true
128

139
libraryDependencies += "org.apache.commons" % "commons-compress" % "1.6"

project/sbt-betterzip/src/main/scala/com/avi/sbt/betterzip/BetterZip.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import sbt.ErrorHandling.translate
2323
import sbt.Using._
2424

2525
import scala.annotation.tailrec
26+
import scala.language.implicitConversions
27+
2628
import java.io.File
2729

2830
import org.apache.commons.compress.archivers.zip.{ AsiExtraField, ZipArchiveEntry, ZipArchiveOutputStream }

0 commit comments

Comments
 (0)