You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "David Arthur (JIRA)" <ji...@apache.org> on 2013/12/07 16:49:35 UTC

[jira] [Comment Edited] (KAFKA-1171) Gradle build for Kafka

    [ https://issues.apache.org/jira/browse/KAFKA-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13842045#comment-13842045 ] 

David Arthur edited comment on KAFKA-1171 at 12/7/13 3:47 PM:
--------------------------------------------------------------

Here is a very simple Gradle project that compiles and tests the "core" part of the Kafka source tree.

Notable things missing:
* Multiple versions of Scala (http://issues.gradle.org/browse/GRADLE-2478)
* Other sub-modules (perf, contrib, etc)
* Release packaging
* Gradle wrapper (to avoid developers needing it installed system-wide)
* Other stuff I'm forgetting at the moment

As I understand it, all of these things are possible with existing Gradle plugins except for multiple Scala versions - couldn't find an answer there.

Compared with the Ant build, it is much less verbose, but less flexible. Doing things like cross-targeting Scala is pretty cut-and-dry with Ant. Setting up this simple project up didn't take me very long (~1.5 hours) but I did run into some bad documentation from Gradle's website and some unhelpful errors. Here are two of the more fun errors I encountered: https://gist.github.com/mumrah/6de7be3d6640059904b5

The error messaging gives me pause, b/c (in my experience) it's almost immediately obvious what went wrong with your build in Ant. Also notice that Gradle is calling the ant scalac target.

Looking forward hear to what others think!


was (Author: mumrah):
Here is a very simple Gradle project that compiles and tests the "core" part of the Kafka source tree.

Notable things missing:
* Multiple versions of Scala (http://issues.gradle.org/browse/GRADLE-2478)
* Other sub-modules (perf, contrib, etc)
* Release packaging
* Other stuff I'm forgetting at the moment

As I understand it, all of these things are possible with existing Gradle plugins except for multiple Scala versions - couldn't find an answer there.

Compared with the Ant build, it is much less verbose, but less flexible. Doing things like cross-targeting Scala is pretty cut-and-dry with Ant. Setting up this simple project up didn't take me very long (~1.5 hours) but I did run into some bad documentation from Gradle's website and some unhelpful errors. Here are two of the more fun errors I encountered: https://gist.github.com/mumrah/6de7be3d6640059904b5

The error messaging gives me pause, b/c (in my experience) it's almost immediately obvious what went wrong with your build in Ant. Also notice that Gradle is calling the ant scalac target.

Looking forward hear to what others think!

> Gradle build for Kafka
> ----------------------
>
>                 Key: KAFKA-1171
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1171
>             Project: Kafka
>          Issue Type: Improvement
>          Components: packaging
>    Affects Versions: 0.8.1, 0.9.0
>            Reporter: David Arthur
>            Assignee: David Arthur
>         Attachments: 0001-Adding-basic-Gradle-build.patch
>
>
> We have previously discussed moving away from SBT to an easier-to-comprehend-and-debug build system such as Ant or Gradle. I put up a patch for an Ant+Ivy build a while ago[1], and it sounded like people wanted to check out Gradle as well.
> 1. https://issues.apache.org/jira/browse/KAFKA-855



--
This message was sent by Atlassian JIRA
(v6.1#6144)