How to change sbt version for project

情到浓时终转凉″ 提交于 2019-12-24 23:56:50

问题


I have build.properties file in the project with the following line:

sbt.version=1.2.8

build.properties file is in the same folder as build.sbt file.

But when I enter the command "sbt about", it reports 1.0.3. Following is the actual output of the command:

/Users/kale> sbt about
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/kale/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from 
/Users/kale/workspace/gr8Project/myapp/project
[info] Loading settings from build.sbt ...
[info] Set current project to myapp (in build 
file:/Users/kale/workspace/gr8Project/myapp/)
[info] This is sbt 1.0.3
[info] The current project is 
{file:/Users/kale/workspace/gr8Project/myapp/}myapp 0.1-SNAPSHOT
[info] The current project is built against Scala 2.12.8
[info] Available Plugins: sbt.plugins.IvyPlugin, 
sbt.plugins.JvmPlugin, sbt.plugins.CorePlugin, 
sbt.plugins.JUnitXmlReportPlugin, 
sbt.plugins.Giter8TemplatePlugin, sbtassembly.AssemblyPlugin, 
com.lucidchart.sbt.scalafmt.ScalafmtCorePlugin, 
com.lucidchart.sbt.scalafmt.ScalafmtPlugin, 
com.lucidchart.sbt.scalafmt.ScalafmtSbtPlugin, 
scoverage.ScoverageSbtPlugin, 
net.virtualvoid.sbt.graph.DependencyGraphPlugin, 
sbtdocker.DockerPlugin, Build, Docker
[info] sbt, sbt plugins, and build definitions are using Scala 
2.12.4

How can I change sbt version to 1.2.8?


回答1:


your project structure should be <root>/project/build.properties, and then you should change the sbt version property (see https://github.com/pedrorijo91/play-slick3-steps/blob/master/project/build.properties as an example)

Use sbt about to know the version in use.



来源:https://stackoverflow.com/questions/54848489/how-to-change-sbt-version-for-project

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