Skip to content

Commit

Permalink
Merge pull request #521 from ScorexFoundation/add-scalac-release-8
Browse files Browse the repository at this point in the history
Fix `MethodNotFound` exception in ByteBuffer on Java 8
  • Loading branch information
catena2w authored Jun 6, 2019
2 parents a6e7e7b + 647af71 commit 6baf579
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ libraryDependencies ++= Seq(

scalacOptions ++= Seq("-feature", "-deprecation")


// set bytecode version to 8 to fix NoSuchMethodError for various ByteBuffer methods
// see https://github.com/eclipse/jetty.project/issues/3244
// these options applied only in "compile" task since scalac crashes on scaladoc compilation with "-release 8"
// see https://github.com/scala/community-builds/issues/796#issuecomment-423395500
javacOptions in(Compile, compile) ++= Seq("-target", "8", "-source", "8" )
scalacOptions in(Compile, compile) ++= Seq("-release", "8")

//uncomment lines below if the Scala compiler hangs to see where it happens
//scalacOptions in Compile ++= Seq("-Xprompt", "-Ydebug", "-verbose" )

Expand Down

0 comments on commit 6baf579

Please sign in to comment.