1

I need to run a sbt plugin compiled for scala 2.11. However, sbt tries to download the plugin for scala 2.12. How I force sbt to use scala 2.11?

ps: adding scalaVersion := "2.11.11" to build.sbt does not solve the problem, as the sbt plugin is not affected by this.

David Portabella
  • 12,390
  • 27
  • 101
  • 182
  • 1
    I wonder - why would anyone publish a SBT plugin compiled using Scala 2.11, given this version is not used by any SBT version? What plugin was this? Are you sure it uses Scala 2.11? – Suma Nov 08 '17 at 18:57
  • no; as you explained in the answer, I guess it was scala 2.10. the problem is solved, thx. – David Portabella Nov 08 '17 at 21:39

1 Answers1

5

You cannot choose what Scala runtime is the SBT built against, you need to use the version compatible with the SBT you have. The only choice you have is which SBT version you use. See also How to change Scala version for build definition?

Sbt 1.x.x requires you to use Java 8 and Scala 2.12 - see SBT 1.0.0

sbt 1.0 uses Scala 2.12 for build definitions and plugins. This also requires JDK 8.

Previous 0.13 versions used Scala 2.10, see 0.13.1 notes:

The Scala version for sbt and sbt plugins is now 2.10.3.

There is no version using 2.11.x

Suma
  • 33,181
  • 16
  • 123
  • 191