Build-automation - sbt: Compile/Test against multiple dependencies

让人想犯罪 __ 提交于 2019-12-03 13:08:50
Sebastien Lorber

You should check this link: Custom test configuration

I know you don't want to do tests but as you can see, we can create different SBT configuration. You will probably be able to take inspiration of the following, and be able to create configurations and tasks so that you can run:

  • guava13:compile
  • guava14:compile
  • guava13:test
  • guava14:test

And you can perhaps try to add the dependencies as follow:

libraryDependencies += "com.google.guava" % "guava" % "13.0" % "guava13"
libraryDependencies += "com.google.guava" % "guava" % "14.0" % "guava14"

So that the dependency is scoped to the guava version configuration you use.

Never done this, can't be sure :)

You can also add cross-build

Nice library idea by the way.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!