Only sbt >1.1.6 is supported.
ParadoxPlugin is enabled whenever
ParadoxSitePlugin is enabled.
Paradox integration now uses the same configuration scopes as the
sbt-paradox plugin. Therefore when upgrading remove the
Paradox configuration scope from all of the
sbt-paradox settings. Note that sbt-site setting
siteSubdirName is still configured under the
Paradox configuration scope.
The default Paradox source directory has been changed to match the one defined in the
sbt-paradox, which is
src/main/paradox. To keep the previous default, add the following to the build:
sourceDirectory in paradox := sourceDirectory.value
The 1.x.x release of sbt-site marks the conversion to the
AutoPlugin facility, first introduced in sbt 0.13.5.
Because sbt best practices have evolved with the introduction of
AutoPlugin, this upgrade to sbt-site has resulted in a number of “breaking changes” insofar as the way site generation is configured (the same functionality remains).
The biggest of the breaking changes is the use of
enablePlugins(<plugin object>) instead of calls of the form
The base plugin (
SitePlugin) is enabled by default, so files in the
src/site directory are processed according to the default settings. Invocation of other generators must be adjusted accordingly.
|Generator||Previous (0.x)||New (1.x)|
Each of the generators can be instructed to populate a subdirectory under the
target/site destination. This is done by setting the
siteSubdirName key in the configuration scope of the generator. For example, the following
build.sbt fragment enables the Jekyll and Scaladoc generators, and configures their output to be
enablePlugins(JekyllPlugin, SiteScaladocPlugin) siteSubdirName in Jekyll := "jekyll-goodness" siteSubdirName in SiteScaladoc := "jekyll-goodness/api"
Content added using:
site.addMappingsToSiteDir(mappings: TaskKey[Seq[(File,String)]], nestedDirectory: String)
has been replaced with:
addMappingsToSiteDir(mappings: TaskKey[Seq[(File, String)]], nestedDirectory: SettingKey[String])
The following examples show how you can define nested directory via a custom setting or by scoping
siteSubdirName to either an sbt key or configuration:
// Define a custom setting and set it to the directory path val someDirName = settingKey[String]("Some dir name") someDirName := "someFancySource" addMappingsToSiteDir(mappings in (Compile, packageSrc), someDirName) // Or using siteSubdirName scoped to a sbt task or a configuration siteSubdirName in ScalaUnidoc := "api" addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc)
PreprocessPlugin, the key
preprocessExts: SettingKey[Set[String]] has been replaced by