Scala compiler options with Gradle
The purpose here is to bookmark this post which shows how to pass flags to the scalac
compiler when using the Scala plugin with Gradle:
http://blog.vorona.ca/compile-options-for-scala-in-gradle.html
–
Here’s a sample build.gradle
in full:
As a reminder, man scalac
will show all the available compiler options. They can also be accessed via the Scala docs: https://docs.scala-lang.org/overviews/compiler-options/index.html
To confirm it’s working sneak something like this into your code: trait Fancy[A[_]]
, then check the compiler output before and after adding the flags.