3 ms·
The intro docs still mention some custom operators: := in http://www.scala-sbt.org/1.x/docs/Basic-Def.html http://www.scala-sbt.org/1.x/docs/Basic-Def.html /
by aphexairlines 9y ago
The intro docs still mention some custom operators:
:= in http://www.scala-sbt.org/1.x/docs/Basic-Def.html http://www.scala-sbt.org/1.x/docs/Basic-Def.html
/ in http://www.scala-sbt.org/1.x/docs/Task-Graph.html http://www.scala-sbt.org/1.x/docs/Task-Graph.html
% in http://www.scala-sbt.org/1.x/docs/Library-Dependencies.html http://www.scala-sbt.org/1.x/docs/Library-Dependencies.html
%% in http://www.scala-sbt.org/1.x/docs/Library-Dependencies.html http://www.scala-sbt.org/1.x/docs/Library-Dependencies.html
I don't know if they're useful or not, but they're there.
- vvillena 9y agoSome quick explanation: := is the standard SBT assignment operator. You see it everywhere, so its use is clear. / is used for directory traversal. This is not SBT-specific, it comes from the File class in the Scala standard library. This is not as common, but it is sometimes used to setup custom source directories. % and %% are used all the time for declaring dependencies. % is the standard separator, and %% is used to automatically choose the library version compatible with the Scala version used in the project. There is also %%%, used in ScalaJS. You can use only % if you want to, the only thing the other two do is add a suffix to the dependency name. So yeah, useful. Still, they could probably have done without these custom symbols.