Set "-encoding UTF-8" for javac. (#268)

Set "-encoding UTF-8" options for javac. Without it compilation fails on platforms where javac defaults to other encoding, like most of Windows that default to whatever code page is active in the system.
This commit is contained in:
Michał Wawrzyniec Urbańczyk 2019-11-05 00:22:49 +01:00 committed by GitHub
parent 59bcabeb21
commit 7f242e2327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,10 +18,15 @@ Global / onChangedBuildSource := ReloadOnSourceChanges
//// Compiler Options ////
//////////////////////////
javacOptions in ThisBuild ++= Seq(
"-encoding", // Provide explicit encoding (the next line)
"UTF-8" // Specify character encoding used by Java source files.
)
scalacOptions in ThisBuild ++= Seq(
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-encoding", // Provide explicit encoding (the next line)
"utf-8", // Specify character encoding used by source files.
"utf-8", // Specify character encoding used by Scala source files.
"-explaintypes", // Explain type errors in more detail.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
"-language:existentials", // Existential types (besides wildcard types) can be written and inferred