Part of using and learning scala build tool involves making small changes to build.sbt and then rerunning sbt tasks. But every time I change my build.sbt I need to restart the sbt console. This isn't a huge deal, but it would be nice if there were an sbt refresh
task or something that handled this.
Does anybody know how to refresh the sbt console after making a build.sbt change?
object Reload extends CancelWatch with Product with Serializable. Action that indicates that the watch should pause while the build is reloaded. This is used to automatically reload the project when the build files (e.g. build.
You can use Pretty Clean to clean the all of dev tools caches including SBT. PrettyClean also cleans the SBT project's target folder.
Deletes all generated files (in the target directory). Compiles the main sources (in src/main/scala and src/main/java directories). Compiles and runs all tests. Starts the Scala interpreter with a classpath including the compiled sources and all dependencies.
In the Project tool window, in the source root directory, locate the build. properties file and open it in the editor. In the editor explicitly specify the version of sbt that you want to use in the project.
sbt reload
does this.
Not sure why this wasn't immediately obvious.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With