简体   繁体   中英

Specify different version of sbt for a subproject in multi-project?

I have a multi-project containing a few subprojects.

The root project's project/build.properties contains

sbt.version=0.13.0

It turned out that one of the subprojects works only with the version 0.12.4 due to a dependency issue.

I put build.properties with that version into its directory but it didn't change the version of sbt for this project.

How do I do that properly? Is it possible at all?

Right now, sbt allows deep task-level dependencies between projects in the same build. So, while the projects each have their own directory, they share one classloader for their build which has all the definitions.

This places the limitation that you cannot have builds sharing incompatible versions.

Removing this restriction may be possible in the future, but for now I'd do one of the following:

  1. Just keep using sbt 0.12.4 for your build
  2. Migrate all communication between projects to happen via Ivy. Have 2 builds with a wrapper script which runs them in the correct order.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM