简体   繁体   中英

How to change sbt version for project

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?

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.

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