Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sbt refresh after changing build.sbt

Tags:

sbt

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?

like image 899
Thomas Luechtefeld Avatar asked Aug 25 '18 01:08

Thomas Luechtefeld


People also ask

What does sbt reload do?

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.

How do I clear my sbt cache?

You can use Pretty Clean to clean the all of dev tools caches including SBT. PrettyClean also cleans the SBT project's target folder.

What does sbt clean compile do?

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.

How can I change sbt version?

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.


1 Answers

sbt reload does this.

Not sure why this wasn't immediately obvious.

like image 120
Thomas Luechtefeld Avatar answered Sep 25 '22 05:09

Thomas Luechtefeld