An annotation that designates that a definition is deprecated. A deprecation warning is issued upon usage of the annotated definition. Library authors should state the library's deprecation policy in their documentation to give developers guidance on how long a deprecated definition will be preserved.
When you uses Simple Build Tool Command 'sbt package', it creates a jar file that includes the class files from your source code and also the content from your src/main/resources folder. Your project dependencies (JAR files in your project's lib folder or managed dependencies declared in build. sbt).
While in sbt shell (if you don't want to change your build.sbt
):
$ sbt
> set ThisBuild/scalacOptions ++= Seq("-unchecked", "-deprecation")
> compile
> exit
Due to in ThisBuild
, set
applies the settings to all sub-projects, as well.
You could also run the above as a single command on command line.
sbt '; set ThisBuild/scalacOptions ++= Seq("-unchecked", "-deprecation") ; compile'
The trick is to use ;
(semicolons) to separate commands and '
(ticks) to include all ;
-separated commands as a single argument to sbt.
Instead of ThisBuild/scalacOptions
use scalacOptions in ThisBuild
scalacOptions := Seq("-unchecked", "-deprecation")
Add this setting to your build.sbt, and, if you have a multi-module project, add it to every project's settings.
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