user2827214 user2827214 - 2 months ago 22
Scala Question

Sbt-assembly unresolved dependency, Scala

I'm installing Sbt-Assembly, but am now stuck.

Sbt Version (from 'sbt about'): 0.13.8
Current project is built against scala 2.11.6
Sbt, sbt plugins, and build definitions are using Scala 2.10.4


addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.0")
resolvers += Resolver.url("bintray-sbt-plugins", url(""))(Resolver.ivyStylePatterns)


scalaVersion in ThisBuild := "2.11.6"


scalaVersion := "2.11.6"

I realize sbt-assembly is for scala 2.10. If I change my project to scala 2.10, I have new unavailable dependencies for 2.10 which is not desirable. Is there a way to configure my project to use 2.10 just for the assembly plugin?

==== bintray-sbt-plugins: tried

:: com.eed3si9n#sbt-assembly;0.14.0: not found

Note: Some unresolved dependencies have extra attributes.
Check that these dependencies exist with the requested attributes.

com.eed3si9n:sbt-assembly:0.14.0 (scalaVersion=2.11, sbtVersion=0.13)


Just remove scalaVersion from global.sbt.

Because SBT is recursive it uses this scalaVersion from global.sbt when building your build files, which fails because SBT 0.13 is built with Scala 2.10, and so are all SBT plugins.