Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change intellij idea to compile with scala 2.11?

I am using Intellij Idea 13.1.4. I have a scala sbt project. It is currently being compiled with Scala 2.10. I would like to change this to Scala 2.11. In my build.sbt, I have:

libraryDependencies ++= Seq(   "org.scala-lang" % "scala-compiler" % "2.11.0",   ... ) 

When I build my project, it still builds as a Scala 2.10 project.

Also, under my Project Settings->Modules->Scala->Facet 'Scala'->Compiler library, Intellij still shows scala-compiler-bundle:2.10.2. There is no option for a 2.11.x bundle. How would I get an option for Scala 2.11.x?

Thanks!

like image 717
Di Zou Avatar asked Sep 03 '14 20:09

Di Zou


People also ask

How do I change the Scala version in IntelliJ?

 In most cases your project JDK is not compatible with Scala or sbt version, try to change the Scala Compile Server SDK. Press Ctrl+Alt+S to open Settings/Preferences dialog. From the options on the left, select Build, Execution, Deployment | Compiler | Scala | Scala Compiler Server.

How do I install a specific version of Scala in IntelliJ?

To install Scala plugin, press Ctrl+Alt+S , open the Plugins page, browse repositories to locate the Scala plugin, click Install and restart IntelliJ IDEA. Now you can successfully check out from VCS, create, or import Scala projects.

How do I add Scala framework support in IntelliJ?

To add Scala support to existing module:Right-click the module in Project View, choose “Add Framework Support…” Check “Scala” in technologies list (unavailable if module has Scala facet attached) Provide a path to Scala installation (if not detected)


1 Answers

In IntelliJ 2016.x you upgrade Scala by

Ensure Scala Plugin up to date.

Then by going to:

File | Other Settings | Default Project Structure | Global Libraries

Click the + button at the top left hand side of the Window

Select Scala SDK

Choose the version you want to install.

like image 70
NOTiFY Avatar answered Sep 22 '22 02:09

NOTiFY