Why is there a build.gradle and a build.sbt in pla

2019-06-16 03:57发布

问题:

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?

回答1:

The files are equivalent, and that is why they both declare (almost) the same dependencies.

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.