How do I enable the Scala SDK for a Scala Facet?

I have a pre-existing module that I want to add some Scala code to.  I've downloaded the Scala plugin (this is for 8.x, latest version).  I can create a new Scala test, but when I try to run it, it says "Scala SDK is not defined"  I've searched up and down the setting and the facet configuration to specify the SDK, but no luck.  I can create a new module from scratch and enable Scala as a facet from the begininng and define an SDK there, but there seems to be some option missing for specifying the SDK when adding a facet to an existing module.

评论操作 固定链接

Hi, Adam.

Since we didn't find any appropriate solution in the current IDEA API to specify Scala SDK similarly to Java SDK, by some implicit convention you just should have scala-library.jar and scala-compiler.jar in some libraries, attached in some libraries to any of modules in your project.