我在项目中有build.properties文件,其内容如下:
sbt.version=1.2.8
build.properties文件与build.sbt文件位于同一文件夹中。
但是当我输入命令“ sbt about”时,它将报告1.0.3。以下是命令的实际输出:
/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
如何将sbt版本更改为1.2.8?
答案 0 :(得分:3)
您的项目结构应为<root>/project/build.properties
,然后应更改sbt版本属性(以https://github.com/pedrorijo91/play-slick3-steps/blob/master/project/build.properties为例)
使用sbt about
知道正在使用的版本。