diff --git a/build.sbt b/build.sbt index 6a6c4cec4..dffdbb625 100644 --- a/build.sbt +++ b/build.sbt @@ -7,7 +7,7 @@ import Sxr.sxr // but can be shared across the multi projects. def buildLevelSettings: Seq[Setting[_]] = inThisBuild(Seq( organization := "org.scala-sbt", - version := "0.13.16-SNAPSHOT", + version := "0.13.18-SNAPSHOT", bintrayOrganization := Some(if (publishStatus.value == "releases") "typesafe" else "sbt"), bintrayRepository := s"ivy-${publishStatus.value}", bintrayPackage := "sbt", diff --git a/compile/interface/src/main/scala/xsbt/Dependency.scala b/compile/interface/src/main/scala/xsbt/Dependency.scala index c20974790..258217e3e 100644 --- a/compile/interface/src/main/scala/xsbt/Dependency.scala +++ b/compile/interface/src/main/scala/xsbt/Dependency.scala @@ -70,8 +70,8 @@ final class Dependency(val global: CallbackGlobal) extends LocateClassFile with // is better than recompiling *every* time, which seems to happen if we let the directory propagate // to `binaryDependency`. for (zip <- ze.underlyingSource; zipFile <- Option(zip.file).filterNot(_.isDirectory)) binaryDependency(zipFile, className) - case pf: PlainFile => binaryDependency(pf.file, className) - case _ => () + case pf: PlainFile => binaryDependency(pf.file, className) + case _ => () } case None => () } diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 87e3f9831..08a372554 100644 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -1933,12 +1933,20 @@ object Classpaths { @deprecated("Specify the classpath that includes internal dependencies", "0.13.0") def autoPlugins(report: UpdateReport): Seq[String] = autoPlugins(report, Nil) + + @deprecated("Specify the jarTypes", "0.13.17") def autoPlugins(report: UpdateReport, internalPluginClasspath: Seq[File]): Seq[String] = - { - val pluginClasspath = report.matching(configurationFilter(CompilerPlugin.name)) ++ internalPluginClasspath - val plugins = classpath.ClasspathUtilities.compilerPlugins(pluginClasspath) - plugins.map("-Xplugin:" + _.getAbsolutePath).toSeq - } + autoPlugins(report, internalPluginClasspath, Set("jar", "bundle")) + + def autoPlugins( + report: UpdateReport, + internalPluginClasspath: Seq[File], + jarTypes: Set[String]): Seq[String] = { + val pluginClasspath = report.matching(configurationFilter(CompilerPlugin.name) && + artifactFilter(`type` = jarTypes)) ++ internalPluginClasspath + val plugins = classpath.ClasspathUtilities.compilerPlugins(pluginClasspath) + plugins.map("-Xplugin:" + _.getAbsolutePath).toSeq + } private[this] lazy val internalCompilerPluginClasspath: Initialize[Task[Classpath]] = (thisProjectRef, settingsData, buildDependencies) flatMap { (ref, data, deps) => @@ -1948,7 +1956,7 @@ object Classpaths { lazy val compilerPluginConfig = Seq( scalacOptions := { val options = scalacOptions.value - val newPlugins = autoPlugins(update.value, internalCompilerPluginClasspath.value.files) + val newPlugins = autoPlugins(update.value, internalCompilerPluginClasspath.value.files, classpathTypes.value) val existing = options.toSet if (autoCompilerPlugins.value) options ++ newPlugins.filterNot(existing) else options } diff --git a/notes/0.13.17.markdown b/notes/0.13.17.markdown new file mode 100644 index 000000000..0646dffb9 --- /dev/null +++ b/notes/0.13.17.markdown @@ -0,0 +1,35 @@ +### Improvements + +- Updates Scala version to 2.10.7 for Java 9 support. [#3848][3848] by [@eed3si9n][@eed3si9n] + +### Bug fixes + +- Backports logging and `clean` concurrency fix. [#2156][2156]/[#3834][3834] by [@dwijnand][@dwijnand] +- Fixes over-compilation on Java 9 `scala.ext.dir`. [#3142][3142]/[#3701][3701] by [@retronym][@retronym] +- Fixes `addSbtPlugin` to use the correct version of sbt. [#3393][3393]/[#3397][3397] by [@dwijnand][@dwijnand] +- Changes the tuple enrichment deprecation warning messages. [#3455][3455] by [@olafurpg][@olafurpg] +- Fixes `addCompilerPlugin(...)` so it can consume compiler plugins published to Ivy repository using sbt 1.x. [#3784][3784]/[#3855][3855] by [@eed3si9n][@eed3si9n] + +### Internal + +- Fixes the source code to be `doc` friendly. [#3401][3401] by [@dwijnand][@dwijnand] + + + [@eed3si9n]: https://github.com/eed3si9n + [@dwijnand]: http://github.com/dwijnand + [@cunei]: https://github.com/cunei + [@jvican]: https://github.com/jvican + [@Duhemm]: https://github.com/Duhemm + [@olafurpg]: https://github.com/olafurpg + [@retronym]: https://github.com/retronym + [3401]: https://github.com/sbt/sbt/pull/3401 + [3393]: https://github.com/sbt/sbt/issues/3393 + [3397]: https://github.com/sbt/sbt/pull/3397 + [3455]: https://github.com/sbt/sbt/pull/3455 + [3142]: https://github.com/sbt/sbt/issues/3142 + [3701]: https://github.com/sbt/sbt/pull/3701 + [2156]: https://github.com/sbt/sbt/issues/2156 + [3834]: https://github.com/sbt/sbt/pull/3834 + [3848]: https://github.com/sbt/sbt/pull/3848 + [3784]: https://github.com/sbt/sbt/issues/3784 + [3855]: https://github.com/sbt/sbt/pull/3855 diff --git a/notes/0.13.17/addSbtPlugin-cross.markdown b/notes/0.13.17/addSbtPlugin-cross.markdown deleted file mode 100644 index aba7194a4..000000000 --- a/notes/0.13.17/addSbtPlugin-cross.markdown +++ /dev/null @@ -1,7 +0,0 @@ -### Bug fixes - -- Fixes `addSbtPlugin` to use the correct version of sbt. [#3393][]/[#3397][] by [@dwijnand][] - - [#3393]: https://github.com/sbt/sbt/issues/3393 - [#3397]: https://github.com/sbt/sbt/pull/3397 - [@dwijnand]: http://github.com/dwijnand diff --git a/notes/0.13.17/example.markdown b/notes/0.13.18/example.markdown similarity index 100% rename from notes/0.13.17/example.markdown rename to notes/0.13.18/example.markdown diff --git a/src/main/conscript/scalas/launchconfig b/src/main/conscript/scalas/launchconfig index b779b1b3a..c44956d4c 100644 --- a/src/main/conscript/scalas/launchconfig +++ b/src/main/conscript/scalas/launchconfig @@ -4,7 +4,7 @@ [app] org: ${sbt.organization-org.scala-sbt} name: sbt - version: ${sbt.version-read(sbt.version)[0.13.15]} + version: ${sbt.version-read(sbt.version)[0.13.17]} class: sbt.ScriptMain components: xsbti,extra cross-versioned: ${sbt.cross.versioned-false} diff --git a/src/main/conscript/screpl/launchconfig b/src/main/conscript/screpl/launchconfig index 7b3ecddaa..d0ebde8f0 100644 --- a/src/main/conscript/screpl/launchconfig +++ b/src/main/conscript/screpl/launchconfig @@ -4,7 +4,7 @@ [app] org: ${sbt.organization-org.scala-sbt} name: sbt - version: ${sbt.version-read(sbt.version)[0.13.15]} + version: ${sbt.version-read(sbt.version)[0.13.17]} class: sbt.ConsoleMain components: xsbti,extra cross-versioned: ${sbt.cross.versioned-false} diff --git a/src/main/conscript/xsbt/launchconfig b/src/main/conscript/xsbt/launchconfig index 7d0881aca..3e441fd7d 100644 --- a/src/main/conscript/xsbt/launchconfig +++ b/src/main/conscript/xsbt/launchconfig @@ -4,7 +4,7 @@ [app] org: ${sbt.organization-org.scala-sbt} name: sbt - version: ${sbt.version-read(sbt.version)[0.13.15]} + version: ${sbt.version-read(sbt.version)[0.13.17]} class: sbt.xMain components: xsbti,extra cross-versioned: ${sbt.cross.versioned-false}