diff --git a/src/reference/01-Faq/00.md b/src/reference/01-Faq/00.md index 60699898..2a50b3fa 100644 --- a/src/reference/01-Faq/00.md +++ b/src/reference/01-Faq/00.md @@ -207,9 +207,9 @@ This run task can be configured individually by specifying the task key in the scope. For example: ```scala -fork in myRunTask := true +myRunTask / fork := true -javaOptions in myRunTask += "-Xmx6144m" +myRunTask / javaOptions += "-Xmx6144m" ``` #### How should I express a dependency on an outside tool such as proguard? diff --git a/src/reference/02-DetailTopics/02-Configuration/14-Testing.md b/src/reference/02-DetailTopics/02-Configuration/14-Testing.md index 6126db4f..f0ee86cc 100644 --- a/src/reference/02-DetailTopics/02-Configuration/14-Testing.md +++ b/src/reference/02-DetailTopics/02-Configuration/14-Testing.md @@ -443,11 +443,11 @@ Then, we can disable parallel execution in just that configuration using: ```scala -parallelExecution in Serial := false +Serial / parallelExecution := false ``` The tests to run in parallel would be run with `test` and the ones to -run in serial would be run with `serial:test`. +run in serial would be run with `Serial/test`. ### JUnit diff --git a/src/reference/02-DetailTopics/04-Tasks-and-Commands/01-Tasks.md b/src/reference/02-DetailTopics/04-Tasks-and-Commands/01-Tasks.md index 71aff202..3fd0c967 100644 --- a/src/reference/02-DetailTopics/04-Tasks-and-Commands/01-Tasks.md +++ b/src/reference/02-DetailTopics/04-Tasks-and-Commands/01-Tasks.md @@ -487,9 +487,9 @@ myTask := { You can scope logging settings by the specific task's scope: ```scala -logLevel in myTask := Level.Debug +myTask / logLevel := Level.Debug -traceLevel in myTask := 5 +myTask / traceLevel := 5 ``` To obtain the last logging output from a task, use the `last` command: diff --git a/src/reference/02-DetailTopics/04-Tasks-and-Commands/02-Input-Tasks.md b/src/reference/02-DetailTopics/04-Tasks-and-Commands/02-Input-Tasks.md index d221daa0..4ee26d91 100644 --- a/src/reference/02-DetailTopics/04-Tasks-and-Commands/02-Input-Tasks.md +++ b/src/reference/02-DetailTopics/04-Tasks-and-Commands/02-Input-Tasks.md @@ -300,7 +300,7 @@ different input applied. For example: ```scala lazy val runFixed2 = taskKey[Unit]("A task that hard codes the values to `run`") -fork in run := true +run / fork := true runFixed2 := { val x = (Compile / run).toTask(" blue green").value diff --git a/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/02-Plugins.md b/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/02-Plugins.md index d6d3430b..2f93601d 100644 --- a/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/02-Plugins.md +++ b/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/02-Plugins.md @@ -324,9 +324,9 @@ object ObfuscatePlugin extends AutoPlugin { // default values for the tasks and settings lazy val baseObfuscateSettings: Seq[Def.Setting[_]] = Seq( obfuscate := { - Obfuscate(sources.value, (obfuscateLiterals in obfuscate).value) + Obfuscate(sources.value, (obfuscate / obfuscateLiterals).value) }, - obfuscateLiterals in obfuscate := false + obfuscate / obfuscateLiterals := false ) } @@ -355,7 +355,7 @@ object Obfuscate { A build definition that uses the plugin might look like. `obfuscate.sbt`: ```scala -obfuscateLiterals in obfuscate := true +obfuscate / obfuscateLiterals := true ``` #### Global plugins example diff --git a/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/03-Plugins-Best-Practices.md b/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/03-Plugins-Best-Practices.md index 63c5069b..9d30628c 100644 --- a/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/03-Plugins-Best-Practices.md +++ b/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/03-Plugins-Best-Practices.md @@ -179,7 +179,7 @@ object WhateverPlugin extends sbt.AutoPlugin { } import autoImport._ override lazy val projectSettings = Seq( - specificKey in Whatever := "another opinion" // DON'T DO THIS + Whatever / specificKey := "another opinion" // DON'T DO THIS ) } ``` @@ -266,8 +266,8 @@ object ObfuscatePlugin extends sbt.AutoPlugin { } import autoImport._ lazy val baseObfuscateSettings: Seq[Def.Setting[_]] = Seq( - obfuscate := Obfuscate((sources in obfuscate).value), - sources in obfuscate := sources.value + obfuscate := Obfuscate((obfuscate / sources).value), + obfuscate / sources := sources.value ) override lazy val projectSettings = inConfig(Compile)(baseObfuscateSettings) } @@ -365,12 +365,12 @@ task itself. See the `baseObfuscateSettings`: ```scala lazy val baseObfuscateSettings: Seq[Def.Setting[_]] = Seq( - obfuscate := Obfuscate((sources in obfuscate).value), - sources in obfuscate := sources.value + obfuscate := Obfuscate((obfuscate / sources).value), + obfuscate / sources := sources.value ) ``` -In the above example, `sources in obfuscate` is scoped under the main +In the above example, `obfuscate / sources` is scoped under the main task, `obfuscate`. #### Rewiring existing keys in `globalSettings` diff --git a/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/05-Testing-sbt-plugins.md b/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/05-Testing-sbt-plugins.md index 39674ce1..9f56f649 100644 --- a/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/05-Testing-sbt-plugins.md +++ b/src/reference/02-DetailTopics/05-Plugins-and-Best-Practices/05-Testing-sbt-plugins.md @@ -66,7 +66,7 @@ lazy val root = (project in file(".")) .settings( version := "0.1", scalaVersion := "2.10.6", - assemblyJarName in assembly := "foo.jar" + assembly / assemblyJarName := "foo.jar" ) ``` @@ -155,7 +155,7 @@ lazy val root = (project in file(".")) .settings( version := "0.1", scalaVersion := "2.10.6", - assemblyJarName in assembly := "foo.jar", + assembly / assemblyJarName := "foo.jar", TaskKey[Unit]("check") := { val process = Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString)) val out = (process!!) diff --git a/src/reference/04-Howto/10-Howto-Scala.md b/src/reference/04-Howto/10-Howto-Scala.md index 1a510927..80a335af 100644 --- a/src/reference/04-Howto/10-Howto-Scala.md +++ b/src/reference/04-Howto/10-Howto-Scala.md @@ -102,46 +102,46 @@ page. ### Define the initial commands evaluated when entering the Scala REPL -Set `initialCommands in console` to set the initial statements to +Set `console / initialCommands` to set the initial statements to evaluate when `console` and `consoleQuick` are run. To configure -`consoleQuick` separately, use `initialCommands in consoleQuick`. For +`consoleQuick` separately, use `consoleQuick / initialCommands`. For example, ```scala -initialCommands in console := """println("Hello from console")""" +console / initialCommands := """println("Hello from console")""" -initialCommands in consoleQuick := """println("Hello from consoleQuick")""" +consoleQuick / initialCommands := """println("Hello from consoleQuick")""" ``` The `consoleProject` command is configured separately by -`initialCommands in consoleProject`. It does not use the value from -`initialCommands in console` by default. For example, +`consoleProject / initialCommands`. It does not use the value from +`console / initialCommands` by default. For example, ```scala -initialCommands in consoleProject := """println("Hello from consoleProject")""" +consoleProject / initialCommands := """println("Hello from consoleProject")""" ``` ### Define the commands evaluated when exiting the Scala REPL -Set `cleanupCommands in console` to set the statements to evaluate after +Set `console / cleanupCommands` to set the statements to evaluate after exiting the Scala REPL started by `console` and `consoleQuick`. To configure `consoleQuick` separately, use -`cleanupCommands in consoleQuick`. For example, +`consoleQuick / cleanupCommands`. For example, ```scala -cleanupCommands in console := """println("Bye from console")""" +console / cleanupCommands := """println("Bye from console")""" -cleanupCommands in consoleQuick := """println("Bye from consoleQuick")""" +consoleQuick / cleanupCommands := """println("Bye from consoleQuick")""" ``` The `consoleProject` command is configured separately by -`cleanupCommands in consoleProject`. It does not use the value from -`cleanupCommands in console` by default. For example, +`consoleProject / cleanupCommands`. It does not use the value from +`console / cleanupCommands` by default. For example, ```scala -cleanupCommands in consoleProject := """println("Bye from consoleProject")""" +consoleProject / cleanupCommands := """println("Bye from consoleProject")""" ``` diff --git a/src/reference/ja/02-DetailTopics/05-Plugins-and-Best-Practices/05-Testing-sbt-plugins.md b/src/reference/ja/02-DetailTopics/05-Plugins-and-Best-Practices/05-Testing-sbt-plugins.md index f10a3218..1bf7925b 100644 --- a/src/reference/ja/02-DetailTopics/05-Plugins-and-Best-Practices/05-Testing-sbt-plugins.md +++ b/src/reference/ja/02-DetailTopics/05-Plugins-and-Best-Practices/05-Testing-sbt-plugins.md @@ -67,7 +67,7 @@ lazy val root = (project in file(".")) .settings( version := "0.1", scalaVersion := "2.10.6", - assemblyJarName in assembly := "foo.jar" + assembly / assemblyJarName := "foo.jar" ) ``` @@ -156,7 +156,7 @@ lazy val root = (project in file(".")) .settings( version := "0.1", scalaVersion := "2.10.6", - assemblyJarName in assembly := "foo.jar", + assembly / assemblyJarName := "foo.jar", TaskKey[Unit]("check") := { val process = Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString)) val out = (process!!)