diff --git a/.travis.yml b/.travis.yml index feb7bebb2..76ef89744 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,9 @@ matrix: env: matrix: - - SBT_CMD=";test:compile;scalafmt::test;test:scalafmt::test;mainSettingsProj/test;safeUnitTests;otherUnitTests" + # drop scalafmt on the 1.0.0 branch to dogfood 1.0.0-RC2 before there is a sbt 1.0 of new-sbt-scalafnt + # - SBT_CMD=";test:compile;scalafmt::test;test:scalafmt::test;mainSettingsProj/test;safeUnitTests;otherUnitTests" + - SBT_CMD=";test:compile;mainSettingsProj/test;safeUnitTests;otherUnitTests" # - SBT_CMD="mimaReportBinaryIssues" - SBT_CMD="scripted actions/*" - SBT_CMD="scripted apiinfo/* compiler-project/* ivy-deps-management/*" diff --git a/build.sbt b/build.sbt index 507c80b23..f8058799f 100644 --- a/build.sbt +++ b/build.sbt @@ -32,9 +32,9 @@ def buildLevelSettings: Seq[Setting[_]] = homepage := Some(url("https://github.com/sbt/sbt")), scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt"), "git@github.com:sbt/sbt.git")), resolvers += Resolver.mavenLocal, - scalafmtOnCompile := true, + // scalafmtOnCompile := true, // scalafmtVersion 1.0.0-RC3 has regression - scalafmtVersion := "0.6.8" + // scalafmtVersion := "0.6.8" )) def commonSettings: Seq[Setting[_]] = @@ -74,8 +74,8 @@ def testedBaseSettings: Seq[Setting[_]] = lazy val sbtRoot: Project = (project in file(".")) .enablePlugins(ScriptedPlugin) // , SiteScaladocPlugin, GhpagesPlugin) - .configs(Sxr.sxrConf) - .aggregateSeq(nonRoots) + .configs(Sxr.SxrConf) + .aggregate(nonRoots: _*) .settings( buildLevelSettings, minimalSettings, diff --git a/project/Docs.scala b/project/Docs.scala index 78836476e..806f9493d 100644 --- a/project/Docs.scala +++ b/project/Docs.scala @@ -5,7 +5,7 @@ import com.typesafe.sbt.site.SitePlugin.autoImport._ import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._ import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._ import com.typesafe.sbt.SbtGit, SbtGit.{ git, GitKeys } -import Sxr.{ sxr, sxrConf } +import Sxr.{ sxr, SxrConf } */ object Docs { @@ -37,8 +37,8 @@ object Docs { def siteIncludeSxr(prefix: String) = Def settings ( mappings in sxr := Path.allSubpaths(sxr.value).toSeq, - siteSubdirName in sxrConf := prefix, - addMappingsToSiteDir(mappings in sxr, siteSubdirName in sxrConf) + siteSubdirName in SxrConf := prefix, + addMappingsToSiteDir(mappings in sxr, siteSubdirName in SxrConf) ) def synchLocalImpl = Def task { diff --git a/project/PublishBinPlugin.scala b/project/PublishBinPlugin.scala index dade05395..98b01f3c1 100644 --- a/project/PublishBinPlugin.scala +++ b/project/PublishBinPlugin.scala @@ -1,6 +1,7 @@ import sbt._, Keys._ -import sbt.internal.librarymanagement.PublishConfiguration +import sbt.librarymanagement.PublishConfiguration +import sbt.librarymanagement.ConfigRef /** This local plugin provides ways of publishing just the binary jar. */ object PublishBinPlugin extends AutoPlugin { @@ -18,13 +19,24 @@ object PublishBinPlugin extends AutoPlugin { override def projectSettings = Def settings ( publishLocalBin := Classpaths.publishTask(publishLocalBinConfig, deliverLocal).value, - publishLocalBinConfig := Classpaths.publishConfig( - (packagedArtifacts in publishLocalBin).value, - Some(deliverLocal.value), - (checksums in publishLocalBin).value, - logging = ivyLoggingLevel.value, - overwrite = isSnapshot.value - ), + + publishLocalBinConfig := { + val _ = deliverLocal.value + Classpaths.publishConfig( + publishMavenStyle.value, + deliverPattern(crossTarget.value), + if (isSnapshot.value) "integration" else "release", + ivyConfigurations.value.map(c => ConfigRef(c.name)).toVector, + (packagedArtifacts in publishLocalBin).value.toVector, + (checksums in publishLocalBin).value, + resolverName = "local", + logging = ivyLoggingLevel.value, + overwrite = isSnapshot.value) + }, + packagedArtifacts in publishLocalBin := Classpaths.packaged(Seq(packageBin in Compile)).value ) + + def deliverPattern(outputPath: File): String = + (outputPath / "[artifact]-[revision](-[classifier]).[ext]").absolutePath } diff --git a/project/SbtLauncherPlugin.scala b/project/SbtLauncherPlugin.scala index 4fca80392..c3b5f229b 100644 --- a/project/SbtLauncherPlugin.scala +++ b/project/SbtLauncherPlugin.scala @@ -1,6 +1,7 @@ import sbt.io.Path._ import sbt._ import Keys._ +import sbt.io.CopyOptions object SbtLauncherPlugin extends AutoPlugin { override def requires = plugins.IvyPlugin @@ -40,7 +41,7 @@ object SbtLauncherPlugin extends AutoPlugin { // TODO - Check if we should rebuild the jar or not.... IO.withTemporaryDirectory { dir => IO.unzip(jar, dir) - IO.copy(overrides.map({ case (n, f) => (f, dir / n) }), overwrite = true) + IO.copy(overrides.map({ case (n, f) => (f, dir / n) }), CopyOptions().withOverwrite(true)) // TODO - is the ok for creating a jar? IO.zip((dir.allPaths --- dir) pair relativeTo(dir), target) } diff --git a/project/Sxr.scala b/project/Sxr.scala index e96aaad21..5154d995c 100644 --- a/project/Sxr.scala +++ b/project/Sxr.scala @@ -2,22 +2,20 @@ import sbt._ import Keys._ import Scope.ThisScope -import sbt.librarymanagement.syntax._ - import sbt.internal.inc.RawCompiler object Sxr { - val sxrConf = config("sxr").hide + val SxrConf = config("sxr").hide val sxr = TaskKey[File]("sxr") val sourceDirectories = TaskKey[Seq[File]]("sxr-source-directories") lazy val settings: Seq[Setting[_]] = inTask(sxr)(inSxrSettings) ++ baseSettings def baseSettings = Seq( - libraryDependencies += "org.scala-sbt.sxr" % "sxr_2.10" % "0.3.0" % sxrConf.name + libraryDependencies += "org.scala-sbt.sxr" % "sxr_2.10" % "0.3.0" % SxrConf ) def inSxrSettings = Seq( - managedClasspath := update.value.matching(configurationFilter(sxrConf.name)).classpath, + managedClasspath := update.value.matching(configurationFilter(SxrConf.name)).classpath, scalacOptions += "-P:sxr:base-directory:" + sourceDirectories.value.absString, scalacOptions += "-Xplugin:" + managedClasspath.value.files .filter(_.getName.contains("sxr")) diff --git a/project/build.properties b/project/build.properties index cd66fd542..c9e698a14 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.0-M6 +sbt.version=1.0.0-RC2 diff --git a/project/plugins.sbt b/project/plugins.sbt index d47e0f288..882ede810 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,7 +6,8 @@ scalacOptions ++= Seq("-feature", "-language:postfixOps") // addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.2") // addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0") // addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.2.0") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.4.0") + +addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1") addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.3.0-M9") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0-M1") -addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.3") +// addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.3")