gpt4 book ai didi

scala - 比较 sbt 和 Gradle

转载 作者:行者123 更新时间:2023-12-03 04:42:36 27 4
gpt4 key购买 nike

我正在深入研究 Scala 并注意到 sbt。我对 java/groovy 项目中的 Gradle 非常满意,而且我知道 Gradle 有一个 scala 插件。

在 Scala 项目中支持 sbt 而不是 Gradle 的充分理由是什么?

最佳答案

请注意,SBT 和 Gradle 之间的一个主要区别是其依赖管理:

  • SBT : Ivy ,修订版可以作为固定修订版(例如 1.5.2)或最新(或动态)修订版。
    请参阅“Ivy Dependency
    这意味着“-SNAPSHOT”机制支持可能会出现问题,即使 Mark Harrah详情见this thread :

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提到 future 所有情况都可能发生变化:

Mark said in the past that he was interested in using Gradle instead of Ivy for SBT.

(两个工具都可以 learn from each other )

关于scala - 比较 sbt 和 Gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11061938/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com