From 965b96acc67ba22d3359b7d09ae69747fe9493ab Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sat, 21 Jan 2017 06:36:33 -0500 Subject: [PATCH] Update the build --- .lib/README | 1 - build.sbt | 36 ++++++++++--------- debian/changelog | 21 ----------- project/build.properties | 3 +- project/plugins.sbt | 2 ++ project/project/plugins.scala | 12 ------- src/debian/changelog | 23 +++++++++++- template-project/build.sbt | 7 ---- template-project/project/Build.scala | 4 --- .../project/plugins/project/Build.scala | 7 ---- 10 files changed, 45 insertions(+), 71 deletions(-) delete mode 100644 .lib/README delete mode 100644 debian/changelog create mode 100644 project/plugins.sbt delete mode 100644 project/project/plugins.scala delete mode 100644 template-project/build.sbt delete mode 100644 template-project/project/Build.scala delete mode 100644 template-project/project/plugins/project/Build.scala diff --git a/.lib/README b/.lib/README deleted file mode 100644 index 6e3f9b576..000000000 --- a/.lib/README +++ /dev/null @@ -1 +0,0 @@ -sbt-launch.jar is downloaded into here. diff --git a/build.sbt b/build.sbt index 0e92dbc20..7c77a99b9 100644 --- a/build.sbt +++ b/build.sbt @@ -23,18 +23,20 @@ val windowsBuildId = settingKey[Int]("build id for Windows installer") // This build creates a SBT plugin with handy features *and* bundles the SBT script for distribution. val root = (project in file(".")). - enablePlugins(UniversalPlugin, LinuxPlugin, DebianPlugin, RpmPlugin, WindowsPlugin). + enablePlugins(UniversalPlugin, LinuxPlugin, DebianPlugin, RpmPlugin, WindowsPlugin, + UniversalDeployPlugin, DebianDeployPlugin, RpmDeployPlugin, WindowsDeployPlugin). settings( organization := "org.scala-sbt", name := "sbt-launcher-packaging", packageName := "sbt", version := "0.1.0", - crossTarget <<= target, - deploymentSettings, + crossTarget := target.value, publishToSettings, sbtLaunchJarUrl := downloadUrlForVersion(sbtVersionToRelease), - sbtLaunchJarLocation <<= target apply (_ / "sbt-launch.jar"), - sbtLaunchJar <<= (sbtLaunchJarUrl, sbtLaunchJarLocation) map { (uri, file) => + sbtLaunchJarLocation := { target.value / "sbt-launch.jar" }, + sbtLaunchJar := { + val uri = sbtLaunchJarUrl.value + val file = sbtLaunchJarLocation.value import dispatch.classic._ if(!file.exists) { // oddly, some places require us to create the file before writing... @@ -52,7 +54,8 @@ val root = (project in file(".")). packageDescription := """This script provides a native way to run sbt, a build tool for Scala and more.""", // Here we remove the jar file and launch lib from the symlinks: - linuxPackageSymlinks <<= linuxPackageSymlinks map { links => + linuxPackageSymlinks := { + val links = linuxPackageSymlinks.value for { link <- links if !(link.destination endsWith "sbt-launch-lib.bash") @@ -63,13 +66,13 @@ val root = (project in file(".")). version in Debian := sbtVersionToRelease, debianPackageDependencies in Debian ++= Seq("java6-runtime-headless", "bash (>= 2.05a-11)"), debianPackageRecommends in Debian += "git", - linuxPackageMappings in Debian <+= (sourceDirectory) map { bd => + linuxPackageMappings in Debian += { + val bd = sourceDirectory.value (packageMapping( - (bd / "debian/changelog") -> "/usr/share/doc/sbt/changelog.gz" + (bd / "debian" / "changelog") -> "/usr/share/doc/sbt/changelog.gz" ) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs() }, - debianChangelog in Debian := Some(file("debian/changelog")), - + debianChangelog in Debian := { Some(sourceDirectory.value / "debian" / "changelog") }, // RPM SPECIFIC version in Rpm := { val stable = (sbtVersionToRelease split "[^\\d]" filterNot (_.isEmpty) mkString ".") @@ -87,7 +90,8 @@ val root = (project in file(".")). // WINDOWS SPECIFIC windowsBuildId := 1, - version in Windows <<= (windowsBuildId) apply { (bid) => + version in Windows := { + val bid = windowsBuildId.value val sv = sbtVersionToRelease (sv split "[^\\d]" filterNot (_.isEmpty)) match { case Array(major,minor,bugfix, _*) => Seq(major, minor, bugfix, bid.toString) mkString "." @@ -105,16 +109,16 @@ val root = (project in file(".")). // Universal ZIP download install. packageName in Universal := packageName.value, // needs to be set explicitly due to a bug in native-packager version in Universal := sbtVersionToRelease, - mappings in Universal <+= sbtLaunchJar map { _ -> "bin/sbt-launch.jar" }, + mappings in Universal += { sbtLaunchJar.value -> "bin/sbt-launch.jar" }, // Misccelaneous publishing stuff... - projectID in Debian <<= moduleID, + projectID in Debian := moduleID.value, projectID in Windows := { val m = moduleID.value m.copy(revision = (version in Windows).value) }, - projectID in Rpm <<= moduleID, - projectID in Universal <<= moduleID + projectID in Rpm := moduleID.value, + projectID in Universal := moduleID.value ) def downloadUrlForVersion(v: String) = (v split "[^\\d]" flatMap (i => catching(classOf[Exception]) opt (i.toInt))) match { @@ -160,7 +164,7 @@ def makePublishToForConfig(config: Configuration) = { // } yield bintrayRelease(repo, bintrayPackage, version, sLog) // } )) ++ Seq( - resolvers <++= (publishTo in config) apply (_.toSeq) + resolvers ++= ((publishTo in config) apply (_.toSeq)).value ) } diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 31d4e3726..000000000 --- a/debian/changelog +++ /dev/null @@ -1,21 +0,0 @@ -sbt (0.13.13) stable; urgency=low - - * The `new` command, which helps creating new build definitions. - This is extensible via `templateResolverInfos` setting. - sbt 0.13.13 will ship with Giter8 template resolver out of the box. - #2705 by @eed3si9n - * Auto plugins can add synthetic subprojects. #2717 by @eed3si9n - * The no-longer-documented sbt 0.12 DSL `<<=`, `<+=`, and `<++=` - operators and tuple enrichment are now marked deprecated. - (These are removed in 1.0.x branch.) @eed3si9n and @dwijnand - * The `.value` method is deprecated for input tasks since `.evaluated` - is normally what's needed. - (Also removed in 1.0.x branch) #2709 by @eed3si9n - * sbt 0.13.13 will display deprecation warning for build.sbt. - #2784 by @eed3si9n - * Renames the early command `--` that was added in 0.13.1 to - `early()`. `--error` will work, but we encourage you to - migrate to single hyphen version: `-error`, `-warn`, `-info`, and - `-debug`. #2742 by @eed3si9n - - -- Dale Wijnand Fri, 28 Oct 2016 14:30:00 +0000 diff --git a/project/build.properties b/project/build.properties index 75836b233..27e88aa11 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1,2 +1 @@ -sbt.version=0.13.11 - +sbt.version=0.13.13 diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 000000000..2c21f109f --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1,2 @@ +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.4") +libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.10" diff --git a/project/project/plugins.scala b/project/project/plugins.scala deleted file mode 100644 index c361ee041..000000000 --- a/project/project/plugins.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object PluginBuild extends Build { - override def projects = Seq(root) - - val root = Project("root", file(".")) settings( - resolvers += Resolver.url("scalasbt", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns), - addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.4"), - libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.10" - ) -} diff --git a/src/debian/changelog b/src/debian/changelog index ec30582fa..810742dc3 100644 --- a/src/debian/changelog +++ b/src/debian/changelog @@ -1,10 +1,31 @@ +sbt (0.13.13) stable; urgency=low + + * The `new` command, which helps creating new build definitions. + This is extensible via `templateResolverInfos` setting. + sbt 0.13.13 will ship with Giter8 template resolver out of the box. + #2705 by @eed3si9n + * Auto plugins can add synthetic subprojects. #2717 by @eed3si9n + * The no-longer-documented sbt 0.12 DSL `<<=`, `<+=`, and `<++=` + operators and tuple enrichment are now marked deprecated. + (These are removed in 1.0.x branch.) @eed3si9n and @dwijnand + * The `.value` method is deprecated for input tasks since `.evaluated` + is normally what's needed. + (Also removed in 1.0.x branch) #2709 by @eed3si9n + * sbt 0.13.13 will display deprecation warning for build.sbt. + #2784 by @eed3si9n + * Renames the early command `--` that was added in 0.13.1 to + `early()`. `--error` will work, but we encourage you to + migrate to single hyphen version: `-error`, `-warn`, `-info`, and + `-debug`. #2742 by @eed3si9n + + -- Dale Wijnand Fri, 28 Oct 2016 14:30:00 +0000 sbt (0.12.0-build-0100) * No need for different launcher jar files now -- Joshua Suereth 2012-07-2012 - + sbt (0.11.2-build-0100) * First debian package release diff --git a/template-project/build.sbt b/template-project/build.sbt deleted file mode 100644 index bb948043e..000000000 --- a/template-project/build.sbt +++ /dev/null @@ -1,7 +0,0 @@ -simple_setting("name") is "test-project" - -simple_task("zomg") is { println("ZOMG") } - -simple_task("zomg2") on (name, version) is { (n,v) => println("ZOMG " + n + " = " + v + " !!!!!") } - - diff --git a/template-project/project/Build.scala b/template-project/project/Build.scala deleted file mode 100644 index 9e4f80e1f..000000000 --- a/template-project/project/Build.scala +++ /dev/null @@ -1,4 +0,0 @@ -import sbt._ -import template.TemplateBuild - -object MyAwesomeBuild extends TemplateBuild { } diff --git a/template-project/project/plugins/project/Build.scala b/template-project/project/plugins/project/Build.scala deleted file mode 100644 index 3d793bec8..000000000 --- a/template-project/project/plugins/project/Build.scala +++ /dev/null @@ -1,7 +0,0 @@ -import sbt._ - -object PluginDef extends Build { - override def projects = Seq(root) - lazy val root = Project("plugins", file(".")) dependsOn(extras) - lazy val extras = uri("git://github.com/paulp/sbt-extras") -}