Building Kieker with Gradle

Gradle Setup for Kieker (Under Construction)

Some documentation while working on #1533, #1576.

About Gradle

See  Gradle User Guide

Setting Up Gradle as Command Line Tool

See  https://www.gradle.org/docs/current/userguide/userguide_single.html#installation

Note that a recent version of Gradle is needed. The version contained in most Linux distributions are likely to be outdated.

Setting up Gradle as Eclipse-Plugin

Below, you find a selection of Eclipse plugins that provide support for syntax highlighting etc. in Gradle files. All can be found at the Eclipse Marketplace.

  1. Gradle Buildscript  https://gradle.org/eclipse/
  2. Nodeclipse/Enide Gradle for Eclipse (0.17 on 2014-12-16)
  3. Eclipse Integration Gradle  https://github.com/spring-projects/eclipse-integration-gradle/

The latter two are now bundled in one Gradle IDE pack. The first seems to be the "official" bundle for eclipse according to its website. However, presently only the Gradle IDE pack supports gradle builds out of the box.

Recommended setup: Gradle IDE pack (via Eclipse Marketplace)

Some notes:

  • First of all, it was not really fun to get the Gradle support running(?) in Eclipse. Also, I'm not sure, yet, whether it really works (so far seeing only some basic syntax highlighting).
  • Got it installed (not sure about running ;-)) with Eclipse Kepler. During my installation (Eclipse Luna/Mars for Java/DSL Developers, Linux, 64 bit), I've received some  error messages and the the installation failed; also, Eclipse Marketplace is crashing after having installed STS.
  • "If you want support for editing .gradle files a compatible Groovy Eclipse installation is required. STS 3.0.0 requires Groovy Eclipse 2.7.0. The Gradle tooling should be usable without Groovy Eclipse, but some functionality (related to editing gradle files) will not work." (see  https://github.com/spring-projects/eclipse-integration-gradle/#requirements-for-version-300-of-the-gradle-tooling)
  1. Install Groovy and Grails Toolsuite (GGTS) for Eclipse via Help -> Eclipse Marketplace ... (disabling optional Spring Dashboard and UAA integration)
  2. Install Spring Tool Suite (STS) for Eclipse via Help -> Eclipse Marketplace ... (disabling UAA integration)
  3. Install  Eclipse Integration Gradle via Help -> Eclipse Marketplace ... (disabling optional Spring Dashboard, UAA integration, org.gradle.toolingapi.feature; the latter deactivated because otherwise reported that "The following solutions are not available: Gradle Integration for Eclipse")

  • Now, I have at least syntax highlighting for the Gradle script. However, so far, I do not see that auto completion is working.

Using Gradle to build Kieker

Focusing on command line here

  • Kieker uses a multi-project Gradle setup. The root folder contains the main build.gradle file used to build all projects, which are contained in the kieker-* directories. These projects again have build.gradle file including specifications of dependencies to other projects, allowing to build each project separately.

Important Kieker Gradle Tasks

  • $ gradle distribute --- ...
  • $ gradle distribute -x check -x test --- Same as before but excluding the execution of checks and tests
  • ...