比较sbt和Gradle [英] comparing sbt and Gradle
问题描述
有什么可能是在Gradle上赞同sbt的好理由Scala项目?
请注意,SBT和Gradle之间的一个关键区别在于它的依赖管理 / p>
- SBT :常春藤,其中一个修订版可以作为固定版本(例如1.5.2 )或最新(或动态)。
请参阅 Ivy Dependency
这意味着-SNAPSHOT机制支持可能会有问题,即使 Mark Harrah 详情 this thread :
$ b
确实缓存可能会感到困惑,但常春藤不理解解析快照是不正确的。尤金在另一个线索中解释了这一点,也许在管理员名单上。 sbt的自动更新有一个问题,在0.12中解决。
据我所知,Ivy不支持以Maven的方式发布快照。我相信我已经在其他地方说过了,但是如果有人想改善这种情况,我认为最好花费在与Gradle团队合作来重用他们的依赖管理代码。
只是为了让你知道,常春藤和Maven快照依赖关系的问题是Gradle最终用自己的依赖管理代码取代常春藤的原因之一。这是一项艰巨的任务,但给我们带来了很多善意。 - SBT: Ivy, with a a revision which can be given as a fixed one (1.5.2, for instance) or as latest (or dynamic) one.
See "Ivy Dependency"
That means the "-SNAPSHOT" mechanism support can be problematic, even though Mark Harrah details in this thread: - Gradle: This thread mentions (Peter Niederwieser):
(两种工具都可以互相学习)
I am diving into Scala and noticed sbt. I have been quite happy with Gradle in java/groovy projects, and I know there's a scala plugin for Gradle.
What could be good reasons to favour sbt over Gradle in a Scala project?
Note that one key difference between SBT and Gradle is its dependency management:
It is true the cache can get confused, but it is not true that Ivy doesn't understand resolving snapshots. Eugene explained this point in another thread, perhaps on the admin list. There is an issue with sbt's auto-update that was addressed in 0.12.
What Ivy does not support, as far as I know, is publishing snapshots in the manner Maven does. I believe I have stated this elsewhere, but if anyone wants to improve the situation, my opinion is that effort is best spent working with the Gradle team to reuse their dependency management code.
Just to let you know, problems with Ivy and Maven snapshot dependencies were one of the reasons why Gradle eventually replaced Ivy with its own dependency management code. It was a big task, but brought us a lot of goodness.
This tweet mentions that the all situation could evolve in the future:
Mark said in the past that he was interested in using Gradle instead of Ivy for SBT.
(both tools can learn from each other)
这篇关于比较sbt和Gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!