为什么在播放框架中有一个build.gradle和一个build.sbt? [英] Why is there a build.gradle and a build.sbt in play framework?
问题描述
我开始使用Scala开发Web应用程序.我不明白的是为什么我们有一个build.gradle
文件和一个build.sbt
文件.在两个文件中都定义了依赖项.
I'm starting to develop a web app with scala. What I don't understand is why we have a build.gradle
file and a build.sbt
file. There are dependencies defined in both files.
在哪种情况下我应该使用哪个?
Which one should I use in what case?
推荐答案
文件是等效的,这就是为什么它们都声明(几乎)相同的依赖项的原因.
The files are equivalent, and that is why they both declare (almost) the same dependencies.
因此您可以使用Gradle 或 sbt,但是您无需同时使用两者.如果要使用Gradle,只需删除build.sbt
.如果要使用sbt,只需删除build.gradle
.它们都存在于示例和种子中,以便用户可以选择并查看如何为此类项目配置Gradle/sbt.
So you can use Gradle or sbt, but you won't need to use both. If you want to use Gradle, just remove build.sbt
. If you want to use sbt, just remove build.gradle
. They are both present in samples and seeds so that users can choose and see how to configure Gradle/sbt for that kind of project.
这篇关于为什么在播放框架中有一个build.gradle和一个build.sbt?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!