是否有可能使用gradle开发scala项目? [英] Is it possible to use gradle to develop scala projects?

查看:190
本文介绍了是否有可能使用gradle开发scala项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用sbt来构建scala项目,但它总是显得太复杂了(不熟悉),而且对我来说很重。我也使用gradle构建java项目,这让我很开心。



我想知道是否可以使用gradle构建scala项目?有没有使用Gradle的大型Scala项目?



我的一些朋友告诉我永远不要想到为scala项目使用gradle,但拒绝告诉我原因。

解决方案

在Scala中使用 gradle 非常简单。
我们做了很长一段时间(团队由Java,Groovy和Scala开发人员组成),并且对此非常满意。
大多数情况下工作得很好。



更多关于scala的gradle:
http://www.gradle.org/docs/current/userguide/scala_plugin.html



尽管存在一些问题/不足:


  • 混合代码编译依赖于Java中的Scala代码代码项目。 (一些配置,它可以工作,但不是开箱即用的)

  • 更多针对sbt所需的Scala特定工具的配置

  • 集成一些像Scalastyle 或 scct 这样的Scala工具是不可能的。

  • no sbt console 自从上一次检查以来,它一直没有正常工作)。
  • 将scala_version编号添加到工件必须每次都手动添加(no %% ,如sbt )


I'm using sbt to build scala projects, but it always seems too complex(unfamiliar) and heavy to me. I'm also using gradle to build java projects, and which makes me happy.

I wonder is it possible to use gradle to build scala projects? Is there any big scala projects that uses gradle?

Some of my friends just tell me "Never ever think of using gradle for scala project", but refused to tell me the reason.

解决方案

It's quite easy to use gradle with Scala. We did it for a long time (team mixed of Java ,Groovy and Scala developers) and have been quite happy with it. Most things work quite well out of the box.

More about gradle with scala: http://www.gradle.org/docs/current/userguide/scala_plugin.html

There are some problems/downfalls though:

  • Mixed code compilation when depending on Scala Code from Java in Mixed Code projects. (Some configuration and it will work, but not out of the box)
  • more configuration for Scala specific tools needed as in sbt
  • Integration of some Scala-Tools like the Scalastyle or scct is not possible yet
  • no sbt console (gradle console has not been working properly since the last time I checked)
  • adding the scala_version number to artifacts has to be added manually each time (no %% as in sbt)

这篇关于是否有可能使用gradle开发scala项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆