Setting javac options for SBT dependencies

前端 未结 1 1261
面向向阳花
面向向阳花 2021-01-19 06:38

I am having problems compiling a Java dependency loaded via GIT:

object ApplicationBuild extends Build {
  lazy val project = Project(\"root\", file(\".\")).         


        
相关标签:
1条回答
  • 2021-01-19 07:01

    You are correct that the setting only applies to source files in your project. If the project part of the scope isn't specified, which is typical, it defaults to the enclosing project. To have a setting apply to another project, scope it to that project. For example,

    javacOptions in riakJavaClient ++= Seq("-encoding", "UTF-8")
    

    You can verify that your options are being used with last. For example,

    sbt> last compile
    

    To run commands like the above on a project from git, change to it using project (see help project for details).

    0 讨论(0)
提交回复
热议问题