I want to write a plugin using scala 2.11
sbtPlugin := true scalaVersion := "2.11.0"
The current sbt release (0.13.9) is built on scala 2.10.5 https://github.com/sbt/sbt/blob/0.13.9/build.sbt#L27
EDIT: Does build against 2.11 in the community build.
https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-community-build/lastSuccessfulBuild/consoleFull [sbt] --== Extracting dependencies for sbt ==-- [sbt] Fetching https://github.com/sbt/sbt.git [sbt] into /home/jenkins/workspace/scala-2.11.x-integrate-community-build/target-0.9.1/clones/d12473907f59fe78661e5f2a758557fe14df3ac6 [sbt] Took: 00h 00m 02.3s [sbt] Fetching /home/jenkins/workspace/scala-2.11.x-integrate-community-build/target-0.9.1/clones/d12473907f59fe78661e5f2a758557fe14df3ac6 [sbt] into /home/jenkins/workspace/scala-2.11.x-integrate-community-build/target-0.9.1/extraction/18f58ea36720e88c2e79edce7efe5b626fc09a5e/projects/c2c0436b24853ab78d6f35ecf52a77248da4e537 [sbt] Took: 00h 00m 01.3s [sbt] The following subprojects will be built in project sbt: launcher-interface, test-agent, control, io, datatype-generator, process, scripted-framework, interface, launcher, precompiled-2_8_2, relation, classpath, api, precompiled-2_9_2, logging, compile, run, classfile, scripted-sbt, testing, incremental-compiler, persist, compiler-integration, precompiled-2_9_3, compiler-interface, collections, completion, logic, apply-macro, tasks, task-system, cache, tracking, cross, ivy, compiler-ivy-integration, actions, command, main-settings, main, sbt, scripted-plugin [sbt] --== End Extracting dependencies for sbt ==--
sbt 0.13 uses Scala 2.10.
sbt is a popular tool for compiling, running, and testing Scala projects of any size. Using a build tool such as sbt (or Maven/Gradle) becomes essential once you create projects with dependencies or more than one code file.
sbt needs Scala jars to run itself since it is written in Scala. sbt uses that same version of Scala to compile the build definitions that you write for your project because they use sbt APIs. This version of Scala is fixed for a specific sbt release and cannot be changed.
We can't break binary compatibility for all the sbt 0.13 plugins until we release the next version sbt 0.14 or potentially sbt 1.0, so no Scala 2.11.x sbt until then.
Update:
One way to work around this is to use Fork API. sbt 0.13 is capable of building Scala 2.11 source using Scala 2.11 compilers. You can mimic the way its done, and run Scala 2.10 or 2.11 code from sbt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With