DevOopsJavaPlugin - How to Use
DevOopsJavaPlugin
To use sbt-devoops for a Java project, add the following line to build.sbt
enablePlugins(DevOopsJavaPlugin)
It has
javaVersion
setting- set
crossPaths
andautoScalaLibrary
to false - default
javacOptions
:-source
and-target
set to thejavaVersion
above,-Xlint:unchecked
, and set-encoding
toUTF-8
override lazy val projectSettings: Seq[Setting[_]] = Seq(
javaVersion := "1.8", // 1.8 is default if not specified otherwise.
crossPaths := false,
autoScalaLibrary := false,
javacOptions ++= Seq(
"-source", javaVersion.value,
"-target", javaVersion.value,
"-Xlint:unchecked",
"-encoding", "UTF-8"
)
)